bkkothari2255 commented on PR #72:
URL:
https://github.com/apache/sling-org-apache-sling-xss/pull/72#issuecomment-6532833080
@joerghoh Thanks for catching these
1 Canonicalization (`%31%30%30`, `100`, `\x31\x30\x30`): I propose
treating this as an intentional compatibility change
In web apps, request parameters are already URL-decoded at the HTTP layer,
and decoding HTML entities or JS escapes inside a numeric validator was an
artifact of ESAPI's `BaseValidationRule` and rebuilding custom decoders would
defeat the goal of removing ESAPI's codec baggage
I have added regression tests ensuring encoded inputs return the default
value
2 `getValidDouble` Syntax:
- Whitespace (`" 100.5 "`): ESAPI already trimmed `Integer` and `Long` ,
trimming `Double` fixes an inconsistency in ESAPI's `NumberValidationRule`
- Hex floats / suffixes (`0x1.0p3`, `1d`, `1f`): These are standard
`Double.parseDouble` syntax and return safe, strongly typed `Double` values
I have pushed commit to adding characterization tests for these `Double`
cases and regression tests for the encoded inputs
(Please let me know if you'd prefer strict decimal-only parsing for `Double`
instead)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]