Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webdav: path-escape the lock root #167

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Feb 15, 2023

  1. webdav: path-escape lockroot

    We ran in to an issue with various microsoft products accessing files
    over WebDAV which contain `%` characters in the name. The requests are
    all properly escaped -- e.g. the `%` is replaced with `%25`. Further
    the basic list functionality of the propfind responses contain encoded
    urls.
    
    The lock response/discovery includes the URL (lockroot) to the locked
    file. The existing implementation does not path escape that url. This
    seems to cause problems with the microsoft applications. When faced with
    the unencoded response, they try to lock again and fail. One explanation
    for this behaviour is that they maintain a table of locks indexed by
    encoded url. When the response from the server doesn't align with the
    URL they locked, the application fails.
    
    Update the lock discovery response code to escape the lockroot so that
    it matches everything else.
    klarose committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    c72303b View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2023

  1. webdav: use url.URL to escape lockroot

    The lockroot is a path in the webdav library, meaning it may have
    slashes in it. Use the url.URL struct to handle this case when escaping
    the lockroot. Also add some unit tests.
    klarose committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    806b1f1 View commit details
    Browse the repository at this point in the history