Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance Bug Report] Specific input cause endless loop in UrlResolver.java #472

Open
yinxiL opened this issue Aug 22, 2022 · 1 comment

Comments

@yinxiL
Copy link

yinxiL commented Aug 22, 2022

Hi, we are working on the Algorithmic Complexity Denial-of-Service problem.
Our bug detection tool detected a performance bug from your code.

In UrlResolver.java, the method resolveUrl would hang for specific input.
The while loop at line 348 would not terminate when slashIndex < 0 (e.g., path = a/../) or "..".equals(pathSegment.substring(slashIndex)) (e.g. path = ../../), since the key variable path remains unchanged under these conditions.

@liukuan1
Copy link

liukuan1 commented Aug 22, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants