Repository navigation
mod_dav: Fix If header "Not" lock token handling and PROPFIND property quoting - #1086
Merged
Merged
Conversation
* modules/dav/main/util.c (dav_find_submitted_locktoken): Skip states with a "Not" condition. * test/modules/dav/test_006_if_not_locktoken.py: New test. * changes-entries/dav-if-not-locktoken.txt: New file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* modules/dav/main/props.c (dav_insert_coreprop): Quote the getcontenttype and getcontentlanguage values. * test/modules/dav/test_007_propfind_quoting.py: New test. * changes-entries/dav-propfind-quoting.txt: New file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent
mod_davfixes, one per commit.A lock token given under
Notin theIfheader was counted as submitting that token when the header was rescanned for a locked resource, so a request such asIf: <other-uri> (Not <token>)was allowed to modify the locked resource.dav_find_submitted_locktoken()now only counts tokens given withoutNot, and such requests get a 423.The
DAV:getcontenttypeandDAV:getcontentlanguagevalues in aPROPFINDresponse were copied from the subrequest without XML quoting, so a value containing&or<(e.g. aForceTypewith such a parameter) produced a malformed response.DAV:lockdiscoveryandDAV:supportedlockare XML fragments and are left alone.There is no test for
DAV:getcontentlanguage, onlyDAV:getcontenttype.🤖 Generated with Claude Code