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

Issue #11361 - UriCompliance.checkUriCompliance improvements #11444

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

joakime
Copy link
Contributor

@joakime joakime commented Feb 23, 2024

Fixes: #11361

@joakime joakime added the Bug For general bugs on Jetty side label Feb 23, 2024
@joakime joakime requested a review from gregw February 23, 2024 16:20
@joakime joakime self-assigned this Feb 23, 2024
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight improvement in loop, but otherwise OK

Comment on lines 363 to 365
for (UriCompliance.Violation violation : UriCompliance.Violation.values())
{
if (uri.hasViolation(violation) && (compliance == null || !compliance.allows(violation)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (UriCompliance.Violation violation : UriCompliance.Violation.values())
{
if (uri.hasViolation(violation) && (compliance == null || !compliance.allows(violation)))
for (UriCompliance.Violation violation : uri.getViolations())
{
if (compliance == null || !compliance.allows(violation))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@joakime joakime requested a review from gregw February 26, 2024 15:45
@joakime joakime merged commit 866f445 into jetty-12.0.x Feb 27, 2024
8 checks passed
@joakime joakime deleted the fix/12.0.x/uricompliance.check branch February 27, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Question about UriCompliance.checkUriCompliance
2 participants