You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browsers and Node.js type coerce the string '1e1000' to the Number Infinity, but Jint gives NaN.
To Reproduce
varengine=new Engine();// These work
Assert.Equal(double.PositiveInfinity, engine.Evaluate("Number(1e1000)").ToObject());
Assert.Equal(double.PositiveInfinity, engine.Evaluate("+1e1000").ToObject());
Assert.Equal("Infinity", engine.Evaluate("(+1e1000).toString()").ToObject());
Assert.Equal(double.PositiveInfinity, engine.Evaluate("Function('return +' + '1e1000')()").ToObject());// annoying workaround// But these fail
Assert.Equal(double.PositiveInfinity, engine.Evaluate("Number('1e1000')").ToObject());// actually NaN
Assert.Equal(double.PositiveInfinity, engine.Evaluate("+'1e1000'").ToObject());// actually NaN
Assert.Equal("Infinity", engine.Evaluate("(+'1e1000').toString()").ToObject());// actually NaN
Not being able to extract 'y' from Infinity, means you cannot run a JSF*ck transpiler. This is essentially how it gets 'y': (NaN.toString() + (+'1e1000'))[10] and that works in all browsers and Node.js. This is an important language for security research.
The text was updated successfully, but these errors were encountered:
Version used
Jint 4.1.0 on .NET Framework 4.8
Describe the bug
Browsers and Node.js type coerce the string
'1e1000'
to the Number Infinity, but Jint gives NaN.To Reproduce
Expected behavior
+1e1000
--> Infinity (JavaScript) --> double.PositiveInfinity (.NET)+'1e1000'
--> Infinity (JavaScript) --> double.PositiveInfinity (.NET)Additional context
Not being able to extract 'y' from Infinity, means you cannot run a JSF*ck transpiler. This is essentially how it gets 'y':
(NaN.toString() + (+'1e1000'))[10]
and that works in all browsers and Node.js. This is an important language for security research.The text was updated successfully, but these errors were encountered: