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

{"toString":[...]} does not return correct return value #2

Open
masatokinugawa opened this issue Jan 23, 2018 · 1 comment
Open

{"toString":[...]} does not return correct return value #2

masatokinugawa opened this issue Jan 23, 2018 · 1 comment

Comments

@masatokinugawa
Copy link

""+{toString:function(){ return "" }} or ""+{valueOf:function(){ return "" }} should return "" but JStillery returns "[object Object]".
The following code should execute alert(/pass/) but due to this behavior an inifinity loop happens on JStillery.

x = ""+{
    toString: function() {
        return "";
    }
};
if (x) {
    Function("while(1){};return;")();
} else {
    alert(/pass/);
}
@wisec
Copy link
Contributor

wisec commented Jan 24, 2018

Hi @masatokinugawa ,
thanks!
ATM toString/valueOf override and native functions overwrite are not supported, I don't plan to add them soon but it's definitely an important feature to be in the project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants