yetingli/ReDoSHunter

Unexpected behaviour

adnan0944 opened this issue · 1 comments

Clearly describe the bug
...
when I put this regex I get this output, the output should be exponent instead of polynomial in theory.

^(a+)+b$
RESULT-TRUE
POLYNOMIAL
nums:1
POLYNOMIAL AttackString:""+"a"*20000+" "
patternType: SLQ2
vulnerability Position: Unable to locate Vulnerability position
vulnerability Source: Unable to find Vulnerability source

What steps are needed to reproduce the bug?

... put ^(a+)+b$ in the test.txt file and run it.

What did you expect to happen?

... I expected to get the output as Exponent instead of Polynomial

What actually happened (e.g. what warnings or errors did you get)?

... I got the output as Polynomial instead of exponential.

You should check your version of Java in your computer, some redos may not occur in high version of java.
I run the program in Java-8, as follows:

^(a+)+b$
Is attack success: true
Attack time: 1004 (ms)
Vulnerability Position: ^►(▻a+◅)+◄b$
Attack String: "a"+"a"*32+""
Vulnerability Source: There is a nested quantifier node a+ in (a+)+.
Vulnerability Degree: EXPONENT