Repository navigation
[stable35] fix(dav): report a lock that never expires as timeout 0, not -60 - #1285
Merged
Merged
Conversation
The default configuration is `lock_timeout = -1` minutes, which the lock service turns into a lifetime of -60 seconds. That value went out raw on the `nc:lock-timeout` WebDAV property, and clients add it to `lock-time` to work out when the lock expires. So a lock that never expires arrived as one that expired a minute ago, and the Android client happily showed "1 minute ago" next to a perfectly healthy lock. 0 is the value the clients already implement for "this lock does not expire" (documented here since #175, and Android checks for exactly that), so send that instead. The README had drifted to `-1`, which was the config value, not the property value; put it back. Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
… Second--60
FileLock::toLockInfo() feeds the standard {DAV:}timeout property from the
same internal lifetime as nc:lock-timeout, so a lock that never expires
(-60 seconds internally under the default config) went out as
"Second--60". RFC4918 only allows "Second-<n>" or "Infinite" there, and
Sabre's LockDiscovery only renders "Infinite" for a timeout of exactly
Sabre\DAV\Locks\LockInfo::TIMEOUT_INFINITE (-1).
Map a non-positive internal timeout to that sentinel, mirroring how
LockPlugin::davTimeout() already handles the nc:lock-timeout property.
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
backportbot
Bot
requested review from
benjaminfrueh and
juliusknorr
as code owners
September 8, 2026 14:42
benjaminfrueh
approved these changes
Sep 8, 2026
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.
Backport of PR #1271