aneeshusa
Repos
60
Followers
43

Events

opened issue
Panics on PROPFIND //

Thank you for making dufs! I just found it and set it up to use with Joplin and it's working a treat. Glad to have a simple Rust webdav server available.

Problem

dufs panics when getting a PROPFIND request against //. (PROPFIND against / works.) I consider the client sending a // to be buggy and will look to fix it upstream and have it send a / but I would expect dufs not to panic and either handle the request or return an error.

I debugged this locally and it looks like the problem is in or around extract_path: when the incoming request is for //, we attempt to join an absolute path onto self.args.path. Because it's an absolute path it is returned as-is without self.args.path at the front.

Log

If applicable, add logs to help explain your problem.

Setup:

[aneesh@cheetah dufs]$ mkdir empty && dufs empty --allow-all

Works with /:

[aneesh@cheetah dufs]$ curl -X PROPFIND http://localhost:5000/
<?xml version="1.0" encoding="utf-8" ?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/</D:href>
<D:propstat>
<D:prop>
<D:displayname></D:displayname>
<D:getlastmodified>Wed, 09 Nov 2022 16:37:07 +0000</D:getlastmodified>
<D:resourcetype><D:collection/></D:resourcetype>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>%
[aneesh@cheetah dufs]$

with a regular log line in the dufs output:

2022-11-09T11:37:18-05:00 INFO - 127.0.0.1 "PROPFIND /" 207

However, dufs panics on //:

[aneesh@cheetah dufs]$ curl -X PROPFIND http://localhost:5000//
curl: (52) Empty reply from server
[aneesh@cheetah dufs]$

with the following log output:

thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: StripPrefixError(())', src/server.rs:939:53
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Environment:

  • Dufs version: dufs 0.30.0 (both with dufs-v0.30.0-x86_64-unknown-linux-musl.tar.gz and built from git on the current tip dbf2de9cb9216c554788b1bcc01d3d44d3c4ad23)
  • Browser/Webdav Info: Originally encountered with Joplin during sync but reproducable with curl as above
  • OS Info: Arch Linux
Created at 2 weeks ago
issue comment
Fix status code for MKCOL on existing resource

I just discovered dufs and it's neat, thanks for making it! I didn't see any contributing documentation - would you like me to add an entry to the changelog?

Created at 2 weeks ago
pull request opened
Fix status code for MKCOL on existing resource

Per https://datatracker.ietf.org/doc/html/rfc4918#section-9.3.1, MKCOL should return a 405 if the resource already exists.

Impetus for this change: I am using dufs as a webdav server for Joplin which interpreted the previous behavior of returning a 403 as an error, preventing syncing from working.

Created at 2 weeks ago
create branch
aneeshusa create branch fix-status-code-for-mkcol-on-existing-resource
Created at 2 weeks ago
Created at 2 weeks ago
create branch
aneeshusa create branch update-asyncpg-to-0.27.0
Created at 3 weeks ago
pull request opened
asyncpg: 0.26.0 -> 0.27.0
Description of changes

This is the first release to support PostgreSQL 15 (and Python 3.11). It also drops support for Python 3.6, so bump the minimum Python to 3.7.

Things done
  • Built on platform(s)
    • [x] x86_64-linux
    • [ ] aarch64-linux
    • [ ] x86_64-darwin
    • [ ] aarch64-darwin
  • [x] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • [ ] Tested, as applicable:
  • [ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • [x] Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • [ ] (Package updates) Added a release notes entry if the change is major or breaking
    • [ ] (Module updates) Added a release notes entry if the change is significant
    • [ ] (Module addition) Added a release notes entry if adding a new NixOS module
    • [ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • [x] Fits CONTRIBUTING.md.
Created at 3 weeks ago
issue comment
Unnecessary line breaks in method call on multiline string

Quick update: @olivia-hong who works with me on the Backend Language Tooling team at Lyft is going to be picking this work up again!

Created at 1 month ago
issue comment
Tweak pre-commit hook to add --error, make default flags non-overridable

Our process for OSS contribution approval has moved forward and I believe we'll be signing the corp CLA soon.

Created at 1 month ago
issue comment
Tweak pre-commit hook to add --error, make default flags non-overridable

I bumped our internal process for OSS contribution approval (currently pending CLA approval).

Created at 2 months ago