Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Async entry read causes exception when reading AES encrypted zip.

Aperta
#823 8 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@piksel ci sta già lavorando.

Dal 10/4/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

async bug encryption zip
Describe the bug

When trying to read an encrypted archive's entry's input stream asynchronously, it reports an exception containing message: "Auth code missing from input stream".

Yet, if the same archive is read synchronously it works fine.

Reproduction Code

https://dotnetfiddle.net/RhJM7o

Steps to reproduce

It doesn't seem to happen for every input. But for inputs where it does happen, changing the async call to the synchronous version fixes the problem.

The zip input is in the dotnetfiddle.

The steps to create the zip archive from 7-Zip are:

  1. Using the file provided (appendix A)
  2. 7-Zip -> Add to archive
  3. Ensure params:
  • Archive Format: Zip
  • Compression level: 5 - Normal
  • Compression method: * Deflate
  • Encryption method: AES-256
  • Set password (I set mine to "test")
  1. Run the decompress/decrypt steps outlined in the dotnetfiddle
Expected behavior

For the same input, I expected them both to work (the synchronous and the asynchronous).

Operating System

Windows

Framework Version

.NET 6

Tags

ZIP, Encryption, Async

Additional context

No response

Lingua principale
C#
Stelle
3.9k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di icsharpcode/SharpZipLib

Tutte le issue di icsharpcode/SharpZipLib

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.