Skip to content

cookie.parse().login will throw an error if there is cookies by a different name #35

@m4v15

Description

@m4v15

On these lines:
https://github.com/FACK1/Mylibrary/blob/master/src/server/homeHandler.js#L14-L17

You check if any cookies exist and then immediately try to encode the login cookie.

What happens if there is a cookie, but it's not called login (hint: your server will crash)

your if check if once parsed, the login cookie exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions