You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently ran into an issue when testing passwords with whitespace characters on an app with silk installed. I found that if I have multiple consecutive spaces in a password (which silk treats as a sensitive field and tries to mask), the regex substitution in _mask_credentials fails. This is because the user input is used as a pattern in a re.sub and so if the user uses certain characters, they are interpreted as a regex pattern. Space here in the raw_body is a literal +. This seems unsafe.
I recently ran into an issue when testing passwords with whitespace characters on an app with silk installed. I found that if I have multiple consecutive spaces in a password (which silk treats as a sensitive field and tries to mask), the regex substitution in
_mask_credentials
fails. This is because the user input is used as a pattern in are.sub
and so if the user uses certain characters, they are interpreted as a regex pattern. Space here in theraw_body
is a literal+
. This seems unsafe.From: https://github.com/jazzband/django-silk/blob/master/silk/model_factory.py#L131
Is there any reason we can't do a simple string replace instead?
The text was updated successfully, but these errors were encountered: