Skip to content
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

Convert UTF8 encoded passwords to ISO-8859-1 for |R = 6| encryption (issue 6010) #6016

Merged
merged 1 commit into from
May 18, 2015
Merged

Convert UTF8 encoded passwords to ISO-8859-1 for |R = 6| encryption (issue 6010) #6016

merged 1 commit into from
May 18, 2015

Conversation

Snuffleupagus
Copy link
Collaborator

For passwords where the encoding already is correct, the conversion is a no-op.
Also, since encodeURIComponent might throw, we need to make sure that we handle that case too.

Fixes #6010.

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/2da7da4f606ab0d/output.txt

"rounds": 1,
"link": false,
"type": "load",
"password": "æøå",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can \uXXXX or \xHH notation be used here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems to work just fine, thank you!

…issue 6010)

For passwords where the encoding already is correct, the conversion is a no-op.
Also, since `encodeURIComponent` might throw, we need to make sure that we handle that case too.

Fixes 6010.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/ef3d2156bd22aa4/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.22.172.223:8877/45c1deb4a4273d3/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/45c1deb4a4273d3/output.txt

Total script time: 18.02 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/ef3d2156bd22aa4/output.txt

Total script time: 22.97 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@timvandermeij
Copy link
Contributor

According to https://docs.google.com/spreadsheets/d/1Bg3eSe5cGSZJy-4k4j2KV_3hS0uhNtx6Xz3OV3JcncA/edit?pli=1#gid=0, this could also be useful for revision === 4, or am I missing something?

@yurydelendik
Copy link
Contributor

this could also be useful for revision === 4, or am I missing something?

The only viewer that does that is PDF Viewer in Chrome. The Adobe Reader does not do conversion for revision = 4.

@timvandermeij
Copy link
Contributor

Fair enough. Otherwise that can be done later if there are concrete issues for that. Thanks.

yurydelendik added a commit that referenced this pull request May 18, 2015
Convert UTF8 encoded passwords to ISO-8859-1 for |R = 6| encryption (issue 6010)
@yurydelendik yurydelendik merged commit 07af86c into mozilla:master May 18, 2015
@yurydelendik
Copy link
Contributor

Thank you for the fix.

@Snuffleupagus Snuffleupagus deleted the issue-6010 branch May 18, 2015 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't open encrypted PDFs with R = 6 and password containing multibyte characters
4 participants