Commit 1b166af
committed
fix(channelTopicPattern): SonarS5852 vulnerability
Most of the regular expression engines use backtracking to try all
possible execution paths of the regular expression when evaluating an
input, in some cases it can cause performance issues, called
catastrophic backtracking situations.
In the worst case, the complexity of the regular expression is
exponential in the size of the input, this means that a small
carefully-crafted input (like 20 chars) can trigger catastrophic
backtracking and cause a denial of service of the application.
Super-linear regex complexity can lead to the same impact too with, in
this case, a large carefully-crafted input (thousands chars).
Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>1 parent 806feb2 commit 1b166af
1 file changed
Lines changed: 2 additions & 1 deletion
File tree
- application/src/main/java/org/togetherjava/tjbot/features/dynamicvc
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
0 commit comments