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

Separate out ETag validation and parsing logic #33370

Closed
wants to merge 1 commit into from

Conversation

kashike
Copy link
Contributor

@kashike kashike commented Aug 12, 2024

This started off as fixing a bug where weak-prefixed values were not properly validated, and turned into a larger refactor to extract all of the repeated validation and parsing logic into a common ETag class.

If you'd like me to go a different route, just let me know. 😃

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 12, 2024
@snicoll snicoll added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Aug 12, 2024
@rstoyanchev
Copy link
Contributor

rstoyanchev commented Aug 12, 2024

It is better to separate the bug fix from a wider refactoring. The bug fix, depending on severity can be backported for minimum disruption, while the refactoring may be applied selectively or only for future releases.

Could you provide a description of the bug please? The link to a draft commit did not make it obvious.

@kashike
Copy link
Contributor Author

kashike commented Aug 12, 2024

Hey @rstoyanchev! The validation logic checks for a prefix of W/ when it should be checking for W/". As per the spec (see here and here) this allows invalid values to pass through.

@rstoyanchev
Copy link
Contributor

Yes, I see now. Could you submit a separate PR with just the bug fix please? There is still chance to have that applied to the upcoming releases this week. As for the broader refactoring, we can discuss that separately.

@kashike
Copy link
Contributor Author

kashike commented Aug 13, 2024

@rstoyanchev #33374

@rstoyanchev
Copy link
Contributor

Thanks. I've processed #33374 and backported it to 6.0.x and 5.3.x.

As for the wider refactoring, coincidentally we had plans also to make efficiency improvements under #33372, and that will include encapsulation of the logic for better re-use.

I'm closing this for now, but please do follow #33372, and we'll see if there is anything left after it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants