Purexo-GoogleExportation / javascript-bcrypt

Automatically exported from code.google.com/p/javascript-bcrypt
0 stars 0 forks source link

Script causes Stop running script dialog in IE #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run test page in IE and choose rounds greater than 5 in my case.

What is the expected output? What do you see instead?
Expect to see the hash. I get repeated dialog prompts asking if I want to stop 
the script. Eventually the script finishes as long as I don't stop it.

What version of the product are you using? On what operating system?
jsBCrypt version 0.2, Win 7, IE 8.

Please provide any additional information below.
This is not an issue with jsBCrypt per se, jsBrcrypt is performing as expected. 
It is because Microsoft IE default behaviour is to constantly prompt a users 
after 5,000,000 lines have executed. IE thinks it may be stuck in a endless 
loop. 

The loop that causes the issue is in bCrypt.prototype.crypt_raw:

for (i = 0; i < rounds; i++) {
    this.key(password);
    this.key(salt);
}

Rounds > 5 in my case is enough to see the issue. I could probably create a 
workaround sith setTimeout to get around this IE issue. 

Of couse the whole point of jsBcrypt is to be computational expensive, but I 
only opened this issue because had I known about the IE problems beforehand it 
would have saved me a lot of time and trouble, perhaps knowing this can help 
someone else.

Original issue reported on code.google.com by bob%staa...@gtempaccount.com on 30 Jul 2010 at 11:03

GoogleCodeExporter commented 9 years ago
This is a problem with other browsers as well. Since javascript is a single 
threaded language any long running code will block other activities on the 
site. I'm hoping to be able to use either some of the functionality in Mochikit 
or setinterval to make this not block.

Original comment by nevins.bartolomeo@gmail.com on 8 Mar 2011 at 4:28

GoogleCodeExporter commented 9 years ago
We ran into this issue on spideroak's signup page. I wrote a patch to make the 
library non-blocking and to optionally call a progress callback on every 1% 
progress.

Original comment by benjamin...@gmail.com on 14 Dec 2011 at 6:54

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks Benjamin! 

I've pushed the changes up the repo.

Original comment by nevins.bartolomeo@gmail.com on 14 Dec 2011 at 9:21