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

Copying tainted numbers does not propagate taint #219

Open
leeN opened this issue Aug 15, 2024 · 0 comments
Open

Copying tainted numbers does not propagate taint #219

leeN opened this issue Aug 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working primitaint Tainting of primitive types (numbers, bool, etc.)

Comments

@leeN
Copy link
Collaborator

leeN commented Aug 15, 2024

The following piece of code works as expected:

let t = Number.tainted(42);
typeof t // number
t.taint // returns taint object
let t2 = Number(t);
typeof t2 // number
t2.taint // returns same taint object

However, if we do the following:

t = Number.tainted(42);
typeof t // number
t.taint // returns taint object
let t3 = Number(t);
typeof t3 // object
t3.taint // returns null

This does not seem like the desired behavior and might be the root cause for #218.

@leeN leeN added bug Something isn't working primitaint Tainting of primitive types (numbers, bool, etc.) labels Aug 15, 2024
@leeN leeN self-assigned this Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working primitaint Tainting of primitive types (numbers, bool, etc.)
Projects
None yet
Development

No branches or pull requests

1 participant