Skip to content

Fix asymmetric path escaping for file server request URLs - #578

Merged
copybara-service[bot] merged 1 commit into
masterfrom
cl/811357156
Sep 25, 2025
Merged

Fix asymmetric path escaping for file server request URLs#578
copybara-service[bot] merged 1 commit into
masterfrom
cl/811357156

Conversation

@copybara-service

Copy link
Copy Markdown

Fix asymmetric path escaping for file server request URLs

The path components are already escaped twice on the client side before making the request. Once explicitly using url.PathEscape() on each component, and then by using url.String() which escapes the entire path again.

On the server side, using url.EscapedPath() instead of url.Path caused the latter escaping step on the client side not to be unescaped.

If a file in the filestore contains a special character (e.g. /), it could not be accessed due to this bug.

@copybara-service copybara-service Bot added the exported Exported change from internal source label Sep 25, 2025
The path components are already escaped twice on the client side before making the request. Once explicitly using `url.PathEscape()` on each component, and then by using `url.String()` which escapes the entire path again.

On the server side, using `url.EscapedPath()` instead of `url.Path` caused the latter escaping step on the client side not to be unescaped.

If a file in the filestore contains a special character (e.g. `/`), it could not be accessed due to this bug.

PiperOrigin-RevId: 811375109
@copybara-service
copybara-service Bot merged commit 126fd45 into master Sep 25, 2025
@copybara-service
copybara-service Bot deleted the cl/811357156 branch September 25, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Exported change from internal source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant