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

store/pre-auth-hook: error if no session token sent #524

Open
gr2m opened this issue Dec 22, 2016 · 3 comments
Open

store/pre-auth-hook: error if no session token sent #524

gr2m opened this issue Dec 22, 2016 · 3 comments
Assignees

Comments

@gr2m
Copy link
Member

gr2m commented Dec 22, 2016

If a request has no session token, then we do return reply(Boom.unauthorized()), but that only calls the next .then callback and sets session in it to Boom.unauthorized().

We have to throw an error instead and set error.status to 404 so that the .catch callback can take care of it

@minrwhite
Copy link
Member

A corollary to this is the other line from the same function that does return reply.continue(), also resulting in an erroneous call to the next handler in the promise chain.

@gr2m
Copy link
Member Author

gr2m commented Jan 5, 2017

I think this is resolved as part of #526, see the comment at https://github.com/hoodiehq/hoodie-server/pull/526/files#diff-0c9cbe67579a94330b4f853044a4717dR43. Can you confirm that?

@minrwhite
Copy link
Member

Yes, this is indeed now resolved, though the test suite is still throwing out a warning as a result of jupiter/simple-mock#22. I'll update the above PR to fix this only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants