mkdocs-material icon indicating copy to clipboard operation
mkdocs-material copied to clipboard

Privacy plugin seems having problems with @ symbol in filename

Open bitfoo1 opened this issue 2 years ago • 3 comments

Context

No response

Bug description

Hi,

I am unsure if this is a bug or not, therefore I ask here before opening an issue. I think that the privacy plugin doesn't work with encoded @ -> %2F or any other encoded characters in filenames.

You can see the problem on gcix.dev on all the batches. There are only two working batches docker and pypi.

Maybe I missed something in the documentation. Repository: https://gitlab.com/gcix/gcix

Adding some logs too:

INFO    -  Documentation built in 10.61 seconds
INFO    -  [16:15:39] Reloading browsers
WARNING -  [16:15:40] "GET /assets/external/img.shields.io/gitlab/license/gcix%2Fgcix.svg HTTP/1.1" code 404
WARNING -  [16:15:40] "GET /assets/external/img.shields.io/gitlab/pipeline-status/gcix%2Fgcix.6be10e4e.svg HTTP/1.1" code 404
WARNING -  [16:15:40] "GET /assets/external/img.shields.io/gitlab/v/tag/gcix%2Fgcix.63de480b.svg HTTP/1.1" code 404
WARNING -  [16:15:40] "GET /assets/external/img.shields.io/gitlab/last-commit/Gcix%2Fgcix.d72d2dc2.svg HTTP/1.1" code 404
WARNING -  [16:15:40] "GET /assets/external/img.shields.io/gitlab/contributors/gcix%2Fgcix.63de480b.svg HTTP/1.1" code 404
INFO    -  [16:15:40] Browser connected: http://localhost:8000/
WARNING -  [16:15:40] "GET /versions.json HTTP/1.1" code 404
WARNING -  [16:15:40] "GET /assets/external/img.shields.io/npm/dm/%40gcix/gcix.37b11339.svg HTTP/1.1" code 404
WARNING -  [16:15:40] "GET /assets/external/img.shields.io/matrix/gcix%3Amatrix.4eae8735.org.svg HTTP/1.1" code 404
WARNING -  [16:15:40] "GET /assets/external/img.shields.io/gitlab/license/gcix%2Fgcix.svg HTTP/1.1" code 404
WARNING -  [16:15:40] "GET /assets/external/img.shields.io/gitlab/v/tag/gcix%2Fgcix.63de480b.svg HTTP/1.1" code 404
WARNING -  [16:15:40] "GET /assets/external/img.shields.io/gitlab/pipeline-status/gcix%2Fgcix.6be10e4e.svg HTTP/1.1" code 404

Thank you for this awesome piece of software.

Daniel

Related links

Reproduction

INFO - Archive successfully created:

9.5.11-problem-with-privacy-plugin/docs/index.md 448.0 B 9.5.11-problem-with-privacy-plugin/mkdocs.yml 103.0 B 9.5.11-problem-with-privacy-plugin/platform.json 62.0 B 9.5.11-problem-with-privacy-plugin/requirements.lock.txt 320.0 B 9.5.11-problem-with-privacy-plugin/requirements.txt 31.0 B

9.5.11-problem-with-privacy-plugin.zip 1.9 kB 9.5.11-problem-with-privacy-plugin.zip

Steps to reproduce

  1. Using batches with @ or other special characters, from shields.io
  2. Enable privacy plugin

Browser

Chrome

Before submitting

bitfoo1 avatar Feb 24 '24 06:02 bitfoo1

Thanks for reporting and the excellent reproduction. Fixed in ca7e9523f. Indeed this was a shortcoming of the privacy plugin not unquoting URLs before writing the downloaded files to the filesystem. The commit fixes this:

screenshot-localhost-3000-1708758739444

squidfunk avatar Feb 24 '24 07:02 squidfunk

I will wait for the new release. 👍

bitfoo1 avatar Feb 24 '24 07:02 bitfoo1

Released as part of 9.5.12.

squidfunk avatar Feb 29 '24 03:02 squidfunk