{"action":"created","issue":{"url":"https://api.github.com/repos/vdbaan/owasp-java-validator/issues/2","labels_url":"https://api.github.com/repos/vdbaan/owasp-java-validator/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/vdbaan/owasp-java-validator/issues/2/comments","events_url":"https://api.github.com/repos/vdbaan/owasp-java-validator/issues/2/events","html_url":"https://github.com/vdbaan/owasp-java-validator/issues/2","id":120030640,"number":2,"title":"ESAPIValidatorTest.testIsValidDouble() appears to fail with locales that have a different decimal separator.","user":{"login":"volkertb","id":518023,"avatar_url":"https://avatars.githubusercontent.com/u/518023?v=3","gravatar_id":"","url":"https://api.github.com/users/volkertb","html_url":"https://github.com/volkertb","followers_url":"https://api.github.com/users/volkertb/followers","following_url":"https://api.github.com/users/volkertb/following{/other_user}","gists_url":"https://api.github.com/users/volkertb/gists{/gist_id}","starred_url":"https://api.github.com/users/volkertb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volkertb/subscriptions","organizations_url":"https://api.github.com/users/volkertb/orgs","repos_url":"https://api.github.com/users/volkertb/repos","events_url":"https://api.github.com/users/volkertb/events{/privacy}","received_events_url":"https://api.github.com/users/volkertb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-02T20:35:21Z","updated_at":"2015-12-02T20:44:46Z","closed_at":null,"body":"This test fails as follows on a Windows environment I tried it on:\r\n\r\n\tat org.owasp.validator.NumberValidator.validate(NumberValidator.java:161)\r\n\tat org.owasp.validator.NumberValidator.validate(NumberValidator.java:84)\r\n\tat org.owasp.validator.NumberValidator.validate(NumberValidator.java:110)\r\n\tat org.owasp.validator.ESAPIValidatorTest.testIsValidDouble(ESAPIValidatorTest.java:209)\r\n        (...)\r\n\r\nThe reason being that the current system locale on the tested environment (nl_NL) treats the dot as a \"thousands\" separator as opposed to a decimal seprator (which is a comma in the NL locale). As a result, the Number 4.3214 is converted to the long value 43214 (as opposed to 4), which is in fact higher than the specified max value 10.\r\n\r\nOf course, the unit test could be configured to run explicitly using a US locale, but if the ESAPI reference implementation does not require this for the test to pass with any locale, it may handle this more smartly somehow.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vdbaan/owasp-java-validator/issues/comments/161428843","html_url":"https://github.com/vdbaan/owasp-java-validator/issues/2#issuecomment-161428843","issue_url":"https://api.github.com/repos/vdbaan/owasp-java-validator/issues/2","id":161428843,"user":{"login":"volkertb","id":518023,"avatar_url":"https://avatars.githubusercontent.com/u/518023?v=3","gravatar_id":"","url":"https://api.github.com/users/volkertb","html_url":"https://github.com/volkertb","followers_url":"https://api.github.com/users/volkertb/followers","following_url":"https://api.github.com/users/volkertb/following{/other_user}","gists_url":"https://api.github.com/users/volkertb/gists{/gist_id}","starred_url":"https://api.github.com/users/volkertb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volkertb/subscriptions","organizations_url":"https://api.github.com/users/volkertb/orgs","repos_url":"https://api.github.com/users/volkertb/repos","events_url":"https://api.github.com/users/volkertb/events{/privacy}","received_events_url":"https://api.github.com/users/volkertb/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T20:44:46Z","updated_at":"2015-12-02T20:44:46Z","body":"There is a high probability that the failure cause of ESAPIValidatorTest.testIsValidDate() is also Locale-related."}}