-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
chore(suite): update network symbol naming 5 #15746
Conversation
🚀 Expo preview is ready!
|
|
||
if (networkTokenDefinitionType) { | ||
networkTokenDefinitionType[action as TokenManagementAction] = definition.value; | ||
networkTokenDefinitionType[action] = definition.value; |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
library input
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 2 months ago
To fix the problem, we need to ensure that the type
variable cannot be one of the special property names (__proto__
, constructor
, prototype
). We can achieve this by adding a check to reject these values before using them as property names. This will prevent prototype pollution while maintaining the existing functionality.
-
Copy modified lines R69-R71
@@ -68,2 +68,5 @@ | ||
|
||
if (type === '__proto__' || type === 'constructor' || type === 'prototype') { | ||
continue; | ||
} | ||
const networkTokenDefinitionType = tokenDefinitions[symbol]?.[type]; |
274891f
to
80e51ed
Compare
/rebase |
Start rebasing: https://github.com/trezor/trezor-suite/actions/runs/12157937322 |
dfd1284
to
8f67c1c
Compare
Description
Related
Follow up #15690
Related to #14725