-
Notifications
You must be signed in to change notification settings - Fork 5
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
Prototype Pollution of getToken
and putToken
when identityId
is __proto__
#608
Comments
Interesting:
This seems like such a strange behaviour. But it's really that |
|
But you can do it like this:
|
Then you can stringify:
|
|
So this is how you're meant to define such a property:
So the real fix is to ensure that our objects are set with properties using |
Here's another way to do it:
Or:
But this doesn't work:
So if you have |
Describe the bug
Due to JS reserving the use of the
__proto__
key on objects, andgetToken
andsetToken
using an object to store the tokens for all connected identities for any given provider, prototype pollution will occur.To Reproduce
Expected behavior
Using
__proto__
as the identityId should correctly set the token.Screenshots
Platform (please complete the following information)
Additional context
Notify maintainers
@amydevs
The text was updated successfully, but these errors were encountered: