michaelhayman / origami-pdf

Automatically exported from code.google.com/p/origami-pdf
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Encryption bug with some PDF files #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. unzip attached file
2. run bug_encrypt.rb
3. it attempts to create a new PDF file with a Flash object, with encryption
4. Origami crashes with a "frozen object" error.

What is the expected output? What do you see instead?
The encryption crashes only in some cases, for example when embedding a SWF 
file (>10KB) with specific parameters.

/origami/dictionary.rb:135:in `parent=': can't modify frozen object (TypeError)
        from /origami/dictionary.rb:135:in `[]='
        from /origami/dictionary.rb:115:in `map!'
        from /origami/dictionary.rb:114:in `each_pair'
        from /origami/dictionary.rb:114:in `map!'
        from /origami/encryption.rb:307:in `build'
        from /origami/encryption.rb:322:in `build'
        from /origami/encryption.rb:321:in `each'
        from /origami/encryption.rb:321:in `build'
         ... 39 levels...
        from /origami/pdf.rb:495:in `compile'
        from /origami/pdf.rb:236:in `save'
        from /origami/pdf.rb:255:in `saveas'
        from bug_encrypt.rb:60

What version of the product are you using? On what operating system?
- Origami updated on the 22/10/2010
- Ruby 1.8.6 on Windows Vista

Please provide any additional information below.

Seems to be the same bug as described on 
http://groups.google.com/group/origami-pdf/browse_thread/thread/fc623ed0dbfd7486

Original issue reported on code.google.com by decal...@laposte.net on 23 Oct 2010 at 9:19

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, bug has been fixed.

Original comment by guilla...@security-labs.org on 2 Nov 2010 at 5:03