minimaxir / big-list-of-naughty-strings

The Big List of Naughty Strings is a list of strings which have a high probability of causing issues when used as user-input data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

preg replace strings

neerolyte opened this issue · comments

Would be good to include some strings that replace part or all of the matched pattern in common regex libraries e.g:

  • $0, ${0} or \0
  • $1, ${1} or \1

The first set replaces the entire matched pattern back in the output in PHP preg_replace, the second set replaces the first group in the matched pattern.

In both cases they can be used to corrupt strings in interesting ways by attackers if part of the replacement pattern is controlled.