in Hacking

Crash IE, slow down Firefox, with this e-mail validation routine

Searching the internet I found the following e-mail validation routine:


function isValidEmailAddress( address )
{
return String(address).match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,7})+$/);
}

Feed the following (invalid) address to the routine

123456789012345678901234567890abcdefg

Result:

IE hangs, need a complete browser restart!! Maybe you need to be very very patient!
Firefox detects a slow script

I think this is pretty strange!!

Click the link below to test this ‘bug’:

Please crash my browser

Share