Skip to content

Improve error message on inconsistent ZIP files. #2527

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

Merged
merged 1 commit into from
May 4, 2024

Conversation

meisterT
Copy link
Member

@meisterT meisterT commented May 4, 2024

When using the graphical ZIP compress options on Mac OS or Ubuntu, the resulting ZIP archive will be inconsistent, tripping up libzip.

With ziptool you could provoke the error to learn more about the inconsistency but that is unfortunately not available in PHP:

can't open zip archive 'a.zip': Zip archive inconsistent: entry 2: local and central headers do not match

libzip worked around this in
nih-at/libzip@b3e3b19 which was released in
https://github.com/nih-at/libzip/releases/tag/v1.10.1 but that version didn't make it into even unstable Debian/Ubuntu distributions yet.

@vmcj
Copy link
Member

vmcj commented May 4, 2024

We should also backport this.

When using the graphical ZIP compress options on Mac OS or Ubuntu, the
resulting ZIP archive will be inconsistent, tripping up `libzip`.

With `ziptool` you could provoke the error to learn more about the
inconsistency but that is unfortunately not available in PHP:
```
can't open zip archive 'a.zip': Zip archive inconsistent: entry 2: local and central headers do not match
```

`libzip` worked around this in
nih-at/libzip@b3e3b19
which was released in
https://github.com/nih-at/libzip/releases/tag/v1.10.1
but that version didn't make it into even unstable Debian/Ubuntu
distributions yet.
@meisterT meisterT added this pull request to the merge queue May 4, 2024
Merged via the queue into DOMjudge:main with commit 20d66ed May 4, 2024
21 checks passed
@meisterT meisterT deleted the zipincons branch May 4, 2024 12:35
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

Successfully merging this pull request may close these issues.

2 participants