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

Broken chrome builtin unpackaging compatibility #497

Closed
skoniks opened this issue Jun 5, 2024 · 4 comments
Closed

Broken chrome builtin unpackaging compatibility #497

skoniks opened this issue Jun 5, 2024 · 4 comments

Comments

@skoniks
Copy link
Contributor

skoniks commented Jun 5, 2024

I don't consider myself an expert on working with zip archives, but i detected that commit 9c37fa8 brokes compatibility with chrome extension unpackaging compatibility on windows (may be not only on windows).

Attempting to install archived extension you receive an error and temporary extracting folder looks like this:

image

@skoniks
Copy link
Contributor Author

skoniks commented Jun 5, 2024

Utils.canonical replaces backslash to slash, that somehow broken archive extraction

image

@5saviahv
Copy link
Collaborator

5saviahv commented Jun 5, 2024

Interesting, APPNOTE says you should use slash, but backslashes are also permitted in zip files.

idea for adding function there is avoid constructing file names like ..\..\..\windows\system32\drivers\etc\hosts
I have some zip archives created in windows with tools like 7z, WinZIP and they all use slashes.

but I think if chrome really uses backslashes we should add option like useBackslash.

@skoniks
Copy link
Contributor Author

skoniks commented Jun 5, 2024

Interesting, APPNOTE says you should use slash, but backslashes are also permitted in zip files.

idea for adding function there is avoid constructing file names like ..\..\..\windows\system32\drivers\etc\hosts I have some zip archives created in windows with tools like 7z, WinZIP and they all use slashes.

but I think if chrome really uses backslashes we should add option like useBackslash.

As i mentioned before, problem is specific for creating archive on windows, broken archives cause error in all desktop browsers (Opera, Edge, Firefox and others, not only Chrome) for windows and mac. I tried creating the same archive with same pkg version from mac and it do not cause any errors. So i conclude that the problem is specific only for windows, not for browsers.

In other words browsers are incompatible with windows created archives, after changing to backslash 🤔

@skoniks
Copy link
Contributor Author

skoniks commented Jun 5, 2024

Utils.canonical replaces backslash to slash, that somehow broken archive extraction

After some research promlem was opposite in replacing shashes on backslashes, Utils.canonical uses POSIX pth.posix.normalize, and then uses non POSIX pth.join that leads to an error

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

2 participants