Bug 51594 - univention.lib.compression_mime_type_of_buffer() broken
univention.lib.compression_mime_type_of_buffer() broken
Status: NEW
Product: UCS
Classification: Unclassified
Component: univention-lib
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
: 35062 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-30 18:29 CEST by Florian Best
Modified: 2023-06-20 20:48 CEST (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): bitesize
Max CVSS v3 score:
best: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2020-06-30 18:29:47 CEST
univention.lib.compression_mime_type_of_buffer() is broken since a patch in `file` which does:

debian/patches/0006-gzip.patch / debian/patches/local.report-gz-as-application-gzip.patch:
-!:mime»application/x-gzip
+!:mime»application/gzip

This must happen somewhere between UCS 4.2 and UCS 4.3. At least I don't find the patch in UCS 4.0 but in UCS 4.3 and UCS 4.2-errata449.

Patch:
 compression_mime_type_handlers = {
        "application/x-gzip": lambda x: zlib.decompress(x, 16 + zlib.MAX_WBITS),
-       "application/x-bzip2": bz2.decompress
+       "application/gzip": lambda x: zlib.decompress(x, 16 + zlib.MAX_WBITS),
+       "application/x-bzip2": bz2.decompress,
+       "application/bzip2": bz2.decompress,
 }
Comment 1 Florian Best univentionstaff 2020-08-20 16:25:56 CEST
*** Bug 35062 has been marked as a duplicate of this bug. ***