Skip to content

Authentication bypass #3

Closed
Closed
@georgebashi

Description

@georgebashi

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:

if not ngx.var.cookie_AccessToken then
    ...
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!

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