Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate "cookie not found" and "invalid cookie" paths. #56

Open
rien opened this issue Nov 18, 2020 · 0 comments
Open

Separate "cookie not found" and "invalid cookie" paths. #56

rien opened this issue Nov 18, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@rien
Copy link
Collaborator

rien commented Nov 18, 2020

Now we just wrap 'cookie problems' in a CookieError but there is a distinct difference between two situations:

  • There is no cookie with a given name (the cookie was never set, or has expired). This situation is normal and would require the user to login again or restart the oauth flow. This should be a user friendly error.
  • There is a cookie, but we can't deserialize it. This is not normal and is probably a development problem, because we are the one serializing the cookie and because they are encrypted and authenticated, users are not able to tamper with them. This should be an internal server error.

The work here will have to be done in ephermeral/cookieable.rs and errors.rs.

@rien rien added the good first issue Good for newcomers label Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant