sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.84k stars 557 forks source link

Filenames with `#` in its filename #330

Closed mattiasb closed 1 week ago

mattiasb commented 5 months ago

I'm trying to upload a file named for example file[something#else].log to a raw repository in Nexus. When URL-encoding the filename before upload it works almost as expected. The filename in the Web UI is file[something%23else].log though and when I download it from the web UI I get a file file[something%23else].log.

If I copy the download link I get: file%5Bsomething%2523else%5D.log suggesting that specifically the # was double URL encoded somehow (since %25 is % url encoded).

I can manually change the URL to file[something%23else].log and then I get file[something#else].log downloaded.

Yeah. I url encode the file. But I only get so far with that. The filename is still wrong.

Some users at the company I work for create files that they want to upload that contains a # inside square brackets as part of its filename. I would like to be able to upload those and then when I download them from a web browser I expect the filename to stay the same.

When manually uploading through the Nexus Web UI the name shown in the Web UI is file[something#else].log and it downloads it as that filename as well (success!) but when I use a PUT to upload it I can't seem to get the filename to be file[something#else].log instead it becomes file[something%23else].log

No idea.

3.58.1-02 (Not sure about the rest unfortunately as I didn't deploy it myself).

nblair commented 5 months ago

Thanks for opening an issue @mattiasb. We recently addressed something similar to URL encoding for raw repositories in the 3.64 release. Can you upgrade and see if that addresses it?

mattiasb commented 5 months ago

Thanks for opening an issue @mattiasb. We recently addressed something similar to URL encoding for raw repositories in the 3.64 release. Can you upgrade and see if that addresses it?

Cool! Do you have a commit to point to? The history was pretty hard to search through.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] commented 1 week ago

This issue was closed because it has been inactive for 90 days since being marked as stale.