Skip to content

字符转义问题 #47

Description

@hgmmym

问题描述:
当文件存在#符号时,webdav客户端会把#当成锚点把后面部分给切割掉。
如果读取文件时对文件名进行 URL Encode,会导致Header的 authorization 部分的 uri的内容被二次转义,导致服务器authorization校验不通过。

如何还原问题:
找个文件,重命名带个#号的文件名,例如file#name。
当webdav客户端请求资源不对url进行编码时,url会被切割,变成/file。
当webdav客户端请求资源对url进行Url Encode后,url变成/file%23name,但是authorization的uri部分变成file%2523name。此时服务器校验权限失败返回401。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions