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

gen-delims (brackets) not escaped in href #45

Open
chrysn opened this issue Aug 8, 2019 · 4 comments
Open

gen-delims (brackets) not escaped in href #45

chrysn opened this issue Aug 8, 2019 · 4 comments

Comments

@chrysn
Copy link

chrysn commented Aug 8, 2019

When files with brackets ([, ]) in their file names are listed, those characters are not escaped, causing some clients to ignore them. (This was previously pointed out as a bug in davfs2, but found to be on nginx-dav-ext-module's side).

Characters not in pchar (from Simple-ref via path-absolute and segment) should be escaped per RFCs 4918 and 3986.

A working solution is to replace, in the two calls to ngx_escape_uri in ngx_http_dav_ext_module.c, NGX_ESCAPE_URI with NGX_ESCAPE_URI_PATH, which is a new version that'd need to be introduced in ngx_string.[hc]. It leaves the slashes unharmed but escapes almost everything else (so it's a copy of NGX_ESCAPE_ARGS but with the slash left unescaped). I can't really propose that change to upstream before dav-ext-module acknowledges its use case, so: would that work for you?

(This is a successor to #6, which started escaping but only solved the cases many more clients are sensitive to, but not all the cases of not being pchar.)

@Kihara777
Copy link

Kihara777 commented Feb 22, 2020

Replace it with NGX_ESCAPE_URI_PATH throw errors when compile the source, so I checked the doc:
Screenshot_20200222-083227~2
Then replace it with NGX_ESCAPE_URI_COMPONENT, reconpile the module, and everything works fine now.

@notaLonelyDay
Copy link

Why does issue is still open, if it was fixed in
MkfsSion@efbadc1

?

@MkfsSion @chrysn

fjqingyou pushed a commit to fjqingyou/nginx-dav-ext-module that referenced this issue May 18, 2024
@chenshuaiw
Copy link

I also encountered this problem, how to solve it?

@ArcCal
Copy link

ArcCal commented Dec 5, 2024

This repository is already dead. It has been dead for six years. Please accept my condolences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants