Menu

#14 minjson.py backslashed quotes fix

open
nobody
None
5
2006-01-09
2006-01-09
Dan Helfman
No

Calling _getStringState() to count quotes around a
potentially DoS-causing mathematical expression
generally works just fine. However, if there happen to
be backslashed quotes within the string being checked,
then those quotes are counted within _getStringState(),
even though they are backslashed and shouldn't be
counted. The fix is to remove backslashed quotes from
the string being tested from _sanityCheckMath() before
trying to count quotes. Attached is a patch to fix this.

Discussion


Log in to post a comment.