You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've just been reading this as I want to implement a similar thing but using Github's OAuth instead.
I've noticed from your implementation that your "logged in" check is simply:
ifnotngx.var.cookie_AccessTokenthen...end
which is trivially bypassed by just creating a cookie named AccessToken. Am I missing something? Do you authenticate that token separately somewhere else?
FWIW in my implementation I'm planning to use ngx.hmac_sha1 to sign a known message and placing that in the cookie value, which I then check is correct when validating the cookie.
I'd be interested to know if you have a different validation scheme or if I've just missed something obvious in the code. Thanks!
The text was updated successfully, but these errors were encountered:
Hi, I've just been reading this as I want to implement a similar thing but using Github's OAuth instead.
I've noticed from your implementation that your "logged in" check is simply:
which is trivially bypassed by just creating a cookie named
AccessToken
. Am I missing something? Do you authenticate that token separately somewhere else?FWIW in my implementation I'm planning to use
ngx.hmac_sha1
to sign a known message and placing that in the cookie value, which I then check is correct when validating the cookie.I'd be interested to know if you have a different validation scheme or if I've just missed something obvious in the code. Thanks!
The text was updated successfully, but these errors were encountered: