Remove usage of Number constructor #3779
Labels
good first issue
Issues that are suitable for first-time contributors.
help wanted
The author indicates that additional help is wanted.
prio-medium
Resolve this some time soon (tm).
scope-security
Issues that fix security issues: DOS, key leak, CVEs.
The Number constructor is very unsafe because:
any
as parameter. If we change from passing a string to Number to some object Typescript will compile and we'll getNaN
.If you do a text search of the
Number
constructor there are many occurrences:parseInt()
bigintToNumber(bn: bigint): number
If the input of any of those functions is un-trusted data, verify the return is not NaN
The text was updated successfully, but these errors were encountered: