Skip to content

fix: encode lockroot href paths - #1692

Open
whoalin1 wants to merge 1 commit into
sabre-io:masterfrom
whoalin1:devin/1795982400-lockroot-uri-encoding
Open

whoalin1 wants to merge 1 commit into
sabre-io:masterfrom
whoalin1:devin/1795982400-lockroot-uri-encoding

Conversation

@whoalin1

Copy link
Copy Markdown

Fixes #1591. Also addresses the emitter-side root cause described in #1671.

Lock root URIs are stored decoded internally, but {DAV:}href values in XML responses must be valid URI-encoded ASCII. LockDiscovery now applies the same encodePath() treatment used for multistatus response hrefs, so paths containing spaces or non-ASCII characters no longer produce invalid lock responses that clients echo back in malformed If: headers.

Validation:

  • PHP syntax checks passed.
  • LockDiscoveryTest passed: 6 tests, 6 assertions.
  • Full XML property test directory passed: 29 tests, 48 assertions.

Not run: php-cs-fixer/PHPStan; the locally resolved Symfony Console dev dependency uses syntax unsupported by the available PHP 8.3 runtime.

Assisted-by: Devin:adaptive

Lock root paths are stored decoded internally, but hrefs in XML responses must be valid URI-encoded ASCII. Encode them the same way as multistatus response hrefs so paths containing spaces or non-ASCII characters do not produce invalid lock responses.

Assisted-by: Devin:adaptive
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

1 participant