Skip to content

Plugin ZIP validation doesn't cleanly reject \ as path separator #254

@lnicola

Description

@lnicola

URL

No response

On what type of device(s) did you see this bug?

No response

On which operating system(s) are you seeing the problem?

No response

Other OS

No response

On which browser(s) are you seeing the problem?

No response

Other Browser

No response

Summary

According to the ZIP spec, archive entries must use / and not \:

   4.4.17.1 The name of the file, with optional relative path.
   The path stored MUST NOT contain a drive or
   device letter, or a leading slash.  All slashes
   MUST be forward slashes '/' as opposed to
   backwards slashes '\' for compatibility with Amiga
   and UNIX file systems etc.  If input came from standard
   input, there is no file name field.  

But someone just sent me an archive using the latter:

     6335  01-25-2026 23:53   big_downloader_toolbox\big_downloader_toolbox_plugin.py
     2418  01-25-2026 09:42   big_downloader_toolbox\big_downloader_toolbox_provider.py
   522706  12-05-2025 22:04   big_downloader_toolbox\icon.png
      658  03-09-2026 09:36   big_downloader_toolbox\metadata.txt
     1538  12-05-2025 22:24   big_downloader_toolbox\README.md
       17  01-25-2026 09:18   big_downloader_toolbox\requirements.txt
      307  12-05-2025 23:10   big_downloader_toolbox\__init__.py
    14704  01-25-2026 23:57   big_downloader_toolbox\algorithms\download_batnas.pyc
    16355  01-25-2026 23:57   big_downloader_toolbox\algorithms\download_demnas_pro.pyc
    10254  01-25-2026 23:57   big_downloader_toolbox\algorithms\download_rbi_tool_pro.pyc
    11219  01-25-2026 23:57   big_downloader_toolbox\algorithms\license_guard.pyc
     3793  01-25-2026 23:57   big_downloader_toolbox\algorithms\login_demnas.pyc
       72  12-05-2025 23:12   big_downloader_toolbox\algorithms\__init__.py
   541718  12-05-2025 22:06   big_downloader_toolbox\images\icon_batnas.png
   558574  12-05-2025 22:05   big_downloader_toolbox\images\icon_demnas.png
   391090  12-05-2025 22:05   big_downloader_toolbox\images\icon_login.png
   336159  12-05-2025 22:05   big_downloader_toolbox\images\icon_rbi.png

I suspect this will fail validation at https://github.com/qgis/QGIS-Plugins-Website/blob/769758a/qgis-app/plugins/validator.py#L303, but with a confusing error message.

It wasn't the case here, but Windows disk names should also be rejected.

Metadata

Metadata

Assignees

Labels

Size 2bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions