You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org> on 2005/08/17 20:38:56 UTC
[jira] Updated: (TAPESTRY-570) Number translator generates incorrect javascript, preventing validation that the input value is numeric
[ http://issues.apache.org/jira/browse/TAPESTRY-570?page=all ]
Howard M. Lewis Ship updated TAPESTRY-570:
------------------------------------------
Priority: Critical (was: Major)
> 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
> Priority: Critical
>
> 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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org