Fun impossible Firefox JS challenge

crypticswarm crypticswarm at gmail.com
Thu Apr 12 07:34:15 PDT 2012


!function(){
function true(){alert('Call me');};
/* YOUR CODE */
 new Function('(' + ('' +
arguments.callee).match(/function.+?\{\s*([\s\S]*?\})/)[1] + '())')()
}()

It calls *a* function `true` but maybe not *the* function `true`

On Thu, Apr 12, 2012 at 9:27 AM, Peter van der Zee <ecma at qfox.nl> wrote:

> On Thu, Apr 12, 2012 at 4:12 PM, Andreas Rossberg <rossberg at google.com>
> wrote:
> >> Haha nice try even with unicode escapes it still refers to "true" the
> >> boolean not the function.
> >
> > That's another FF deviation from the standard, though.
>
> Identifiers with unicode escapes have the meaning of their canonical
> value. So wouldn't that (tru\u0065 referring to the bool) be valid and
> according to the spec?
>
> - peter
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120412/cad2eecc/attachment-0001.html>


More information about the es-discuss mailing list