1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:57:42 +00:00
serenity/Userland/Libraries/LibPDF
Nico Weber 323d76fbb9 LibPDF: Make encrypted object streams work
There were two problems:
1. parse_compressed_object_with_index() parses indirect objects
   without going through Parser::parse_indirect_value(), so
   push_reference() / pop_reference() weren't called.
   Manually call them, both for the indirect object containing
   the object stream and for the indirect object within the
   object stream.
2. The indirect object within the object stream got decrypted
   twice: Once when the object stream data itself got decrypted,
   and then incorrectly a second time when the object data within
   the stream was read. To fix, disable encryption while parsing
   object stream data (since it's already decrypted).

The test is from http://opf-labs.org/format-corpus/pdfCabinetOfHorrors/
which according to readme.md at the same location is CC0.
2023-07-12 17:16:25 +02:00
..
Fonts LibGfx: Use AntiAliasingPainter::fill_path() for drawing font glyphs 2023-07-10 20:56:25 +02:00
CMakeLists.txt LibPDF: Refactor *Font classes 2023-02-24 20:16:50 +01:00
ColorSpace.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
ColorSpace.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
CommonNames.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
CommonNames.h LibPDF: Add support for AESV2 encryption 2023-07-12 06:28:15 +02:00
Document.cpp LibPDF: Make PDF version accessible on Document 2023-07-11 13:49:17 -04:00
Document.h LibPDF: Make PDF version accessible on Document 2023-07-11 13:49:17 -04:00
DocumentParser.cpp LibPDF: Make encrypted object streams work 2023-07-12 17:16:25 +02:00
DocumentParser.h LibPDF: Make PDF version accessible on Document 2023-07-11 13:49:17 -04:00
Encoding.cpp LibPDF: Avoid unnecessary HashMap copy, mark other copies 2023-05-19 22:33:57 +02:00
Encoding.h LibPDF: Add char_code -> name mapping function 2023-02-08 19:47:15 +01:00
Encryption.cpp LibPDF: Add support for AESV2 encryption 2023-07-12 06:28:15 +02:00
Encryption.h LibPDF: Add support for AESV2 encryption 2023-07-12 06:28:15 +02:00
Error.h LibPDF: Mark PDF::Error nodiscard 2023-07-12 17:03:14 +02:00
Filter.cpp Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
Filter.h LibPDF: Improve error support for Filter class 2023-03-02 12:18:53 +01:00
Forward.h Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
Interpolation.cpp LibPDF: Add first interpolation methods 2022-12-10 10:49:03 +01:00
Interpolation.h LibPDF: Add first interpolation methods 2022-12-10 10:49:03 +01:00
Object.h LibPDF: Make Object::cast<T>() non-const 2023-02-21 00:54:04 +01:00
ObjectDerivatives.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
ObjectDerivatives.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
Operator.h Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
Parser.cpp LibPDF: Do not crash on encrypted files that start unluckily 2023-07-12 06:28:15 +02:00
Parser.h LibPDF: Make encrypted object streams work 2023-07-12 17:16:25 +02:00
Reader.cpp LibPDF: Don't consume anything other than EOL in Reader::consume_eol() 2023-03-22 09:04:00 +01:00
Reader.h LibPDF: Add Reader::try_read for easier error propagation 2023-01-25 15:40:11 +01:00
Reference.h LibPDF: Make Reference store two u32s instead of one 2023-07-10 17:48:15 +01:00
Renderer.cpp LibPDF: Scale vector paths with the view 2023-03-25 16:27:30 -06:00
Renderer.h LibPDF: Allow show_text to return errors 2023-02-24 20:16:50 +01:00
Value.cpp Everywhere: Stop shoving things into ::std and mentioning them as such 2022-12-14 11:44:32 +01:00
Value.h Everywhere: Stop shoving things into ::std and mentioning them as such 2022-12-14 11:44:32 +01:00
XRefTable.h LibPDF: Allow reading documents with incremental updates 2023-02-12 10:55:37 +00:00