[ http://issues.apache.org/jira/browse/TAPESTRY-570?page=all ]
     
Howard M. Lewis Ship closed TAPESTRY-570:
-----------------------------------------

    Fix Version: 4.0
     Resolution: Fixed

> Number translator generates incorrect javascript, preventing validation that 
> the input value is numeric
> -------------------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-570
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-570
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>     Reporter: Howard M. Lewis Ship
>     Assignee: Howard M. Lewis Ship
>     Priority: Critical
>      Fix For: 4.0

>
> Generates a JavaScript console error:
> foo is not defined
> Here's the code:
> function validate_min_number(event, field, min, message)
> {
>       var num = eval(field.value)
>       
>     if (num < min)
>       handle_invalid_field(event, field, message)
> }
> Since field.value is a string, I believe this is being interpreted as a 
> variable reference and failing.
> I can't believe we're using eval() here!  That is a bad, bad idea!  I 
> actually got it to execute arbitrary Javascript by entering that into the 
> field.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to