Repository navigation
Conversation
Sync apps (rclone bisync, FolderSync, GoodSync, Mountain Duck) and file managers reach the site's files at /.dav/, with the same rules, homes, quotas and trash. They sign in with HTTP Basic authentication and an app password: made on the new Sync page (in the account menu), shown once, stored as a SHA-256 hash, revocable one by one, and ended with every password change. Wrong ones count against the client's sign-in budget once they fail, so that a sync app's parallel requests are not refused. Modification times are kept: from rclone's and ownCloud's X-OC-Mtime on upload, and from PROPPATCH of getlastmodified or Windows' Win32LastModifiedTime. PROPFIND reports homes' quotas (RFC 4331); locks are advisory; macOS's ._ and .DS_Store files are taken and dropped. Finder's chunked uploads carry X-Expected-Entity-Length, and must be exactly that long. A PUT with Content-Range is refused rather than taken as the whole file. COPY and MOVE check the rights to do so before what they replace goes to the trash, and never replace a folder holding what they move. Co-Authored-By: Claude Opus 5.5 <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.
Sync apps and file managers can now reach goftp's files over WebDAV at
/.dav/, so a folder on a computer or phone can stay in sync with it. Rules, homes, quotas and the trash all apply as they do on the site.What's new
/.sync/, in the account menu) shows the address to use (your home, if you have one) and your username. It makes app passwords, lists them with when each was created and last used, and revokes them. It also has setup steps for rclone, FolderSync, GoodSync, Mountain Duck/Cyberduck and Finder. Scripts canPOST action=create|revokeand get JSON back.007_app_passwords.sqladds them.Overwrite,Depth: 0), and LOCK/UNLOCK (advisory only).X-OC-Mtimeon upload (rclonevendor=owncloud, ownCloud clients) and from PROPPATCH ofgetlastmodified,Win32LastModifiedTimeor Cyberduck'slastmodified.X-Expected-Entity-Length.._*and.DS_Storefiles are accepted and dropped.Fixes found while building it
PUTwithContent-Rangeused to replace the whole file with just that part. It is now refused with 400 (RFC 9110 §14.5), on the site too./.dav/, WebDAV methods now get 405 instead of 501. Tests were updated to check 501 with an unknown method.Limits (in the README)
client_max_body_size. Browser uploads are unaffected because they're sent in pieces. This matters for the yuhaha deploy behind the Cloudflare tunnel.Testing
internal/server/dav_test.gocovers sign-in (sessions and account passwords refused, revoked or changed passwords, parallel requests, the limiter), PROPFIND, PUT/mtime/chunked/partial, GET, MKCOL, COPY/MOVE, DELETE, PROPPATCH, locks, home privacy and quotas, and the Sync page.internal/auth/apppass_test.gocovers app passwords on both the memory and Postgres stores.go test -race ./...with Postgres passes on macOS, exceptTestLongNonASCIIPath, which fails only on macOS (on main too). Server and auth tests pass on Linux ingolang:1.27.3-alpine. Linux amd64/arm64 and Windows builds pass.bisync --resync, then changes on both sides (a local edit and delete, a site upload and delete, a non-ASCII name), all synced. Deletes went to the trash.rclone aboutshowed the quota, and server-sidemoveto/copytoworked.🤖 Generated with Claude Code