Opened 8 years ago

Last modified 6 years ago

#316 new enhancement

Navigating from encrypted PDF without entering password or canceling and accepting does not work as expected

Reported by: Lewis Rosenthal Owned by:
Priority: minor Milestone: 1.4.2
Component: UI Version: 1.3.6
Keywords: Cc: ataylor

Description

When moving from one document to another either via Shift-PgUp/Shift-PgDn or Ctrl-O, upon encountering a password-protected PDF, one must enter the password and click OK to decrypt before moving to the next document or click Cancel and then OK to dismiss the notification dialog. The main menu is not accessible, either, to select Document | Open...

A better way to handle this would be to allow keyboard accelerators from the password dialog, at least.

Attachments (3)

Password_dialog.png (2.3 KB ) - added by Lewis Rosenthal 8 years ago.
Password dialog is presented when encountering an encrypted file
Notification_panel.png (3.5 KB ) - added by Lewis Rosenthal 8 years ago.
Upon clicking Cancel, the Notification panel is displayed, advising that the file is encrypted
After_dismissing_notification_panel.png (10.7 KB ) - added by Lewis Rosenthal 8 years ago.
After dismissing the Notification panel, we are left with a blank document window

Download all attachments as: .zip

Change History (12)

comment:1 by Lewis Rosenthal, 8 years ago

Cc: ataylor added

Further clarification:

It appears that from the password dialog, Ctrl-O is accepted as the mnemonic for OK and Ctrl-C for Cancel. Pressing Ctrl-O flashes the "opening document" status panel for a brief moment before returning to the password dialog.

The notification dialog which is presented upon pressing Cancel is:

File load error: file is encrypted!

Maybe we should re-think that message at some point (we already know the file is encrypted, so that string is less than helpful).

Alex, your thoughts on how to handle this (including the dialog, which should probably be a separate ticket)?

comment:2 by Lewis Rosenthal, 8 years ago

Last bit about dismissing the notification panel: once dismissed, the user is left with an empty document window. pressing Shift-PgUp/Shift-PgDn at this point yields the same password dialog again (i.e., we still cannot move from this document in that manner), although without the password dialog being present, Ctrl-O works to bring up the Open File dialog (and the menu is accessible).

Bottom line: one cannot move swiftly between documents after encountering an encrypted one.

comment:3 by ataylor, 8 years ago

Sorry, I'm having some trouble visualizing what's happening based on the description.

What is the "notification dialog", is that different from the password prompt?

Are you saying that it's impossible to navigate PgUp/PgDn past an encrypted document? Or just that you have to dismiss the dialog (dialogs?) before you can continue?

by Lewis Rosenthal, 8 years ago

Attachment: Password_dialog.png added

Password dialog is presented when encountering an encrypted file

by Lewis Rosenthal, 8 years ago

Attachment: Notification_panel.png added

Upon clicking Cancel, the Notification panel is displayed, advising that the file is encrypted

by Lewis Rosenthal, 8 years ago

After dismissing the Notification panel, we are left with a blank document window

comment:4 by Lewis Rosenthal, 8 years ago

Further experimentation today revealed even greater inconsistency.

The Notification panel (I previously referred to this erroneously as a dialog when it fact it is just a panel) - with a title of ERROR! (pardon my Farscape font) - advises us that we have an encrypted file. Dismissing this results in a blank Document pane (window). Continuing in the same direction (e.g., Shift-PgDn) leaves us in a loop. However, pressing Shift-PgUp (i.e., reversing direction), we skip back two documents previously loaded.

So, the flow of activity is:

  1. Load a document.
  2. Press Shift-PgDn to move to the next document.
  3. If the document is not encrypted, the next file loads.
  4. If the document is encrypted, the Password dialog is presented.
  5. If the password dialog is cancelled, the Notification panel is presented.
  6. Dismissing the Notification panel by clicking OK yields a blank window.
  7. Press Shift-PgDn to move to the next document.
  8. Lucide loads the same encrypted document, so the Password dialog is again presented.
  9. Loop continues until either a new document is loaded from the toolbar or menu or the password is successfully entered, opening the encrypted document, or...
  10. Press Shift-PgUp to move to the previous document.
  11. Lucide loads the document before the previous document, i.e., two documents up.
  12. Press Shift-PgDn to return to the original direction.
  13. Lucide loads the next document (before the encrypted one which has not been decrypted).
  14. Press Shift-PgDn to move to the next document.
  15. Repeat steps 8-14.

Example list of documents, their encryption status, actions taken, and results:

Number Filename Encrypted? Opened via Result Next File
12011 document.pdfNoMenuOpened2
22011 docs 1.pdfNoShift-PgDnOpened3
32011 docs 2.pdfNoShift-PgDnOpened4
42012 signed pages.pdfNoShift-PgDnOpened5
52012 signed pages encrypted.pdfYesShift-PgDnCancelled3, after Shift-PgUp
62012 document.pdfNoN/ANot reachable

Expected behavior is:

Shift-PgDn from the Password dialog should cancel the Password dialog and attempt to load the next document. If that is encrypted, then display the Password dialog - for that document.

Shift-PgUp from the Password dialog should cancel the Password dialog and attempt to load the previous document. If that is encrypted, then display the Password dialog - for that document.

Should the Notification panel advise that the document is encrypted? We already got a password prompt, so we should know this by now. Perhaps the string should be something more informative, such as 'Unable to decrypt document without password' and then, instead of simply 'OK' to dismiss it, we make it actionable, as in, 'Retry' 'Previous' 'Next' 'Dismiss' (the last of which leaves us at an empty window, and allows us to select an action from the toolbar, the menu, an accelerator, or a window control).

Changing the message string for the notification is easy - so long as we don't need that notice somewhere else for some reason. Unsupported encryption type? We cannot yet handle certificate encryption, yet we open a password dialog for these. Cancelling that will also yield the same notification, which isn't true (certificate required <> password required or unable to decrypt without password). We may need a different message entirely to be accurate (different bug).

comment:5 by Lewis Rosenthal, 8 years ago

I should add that Ctrl-O while at the Password dialog should dismiss the dialog and bring up the Open File dialog.

comment:6 by Lewis Rosenthal, 8 years ago

Summary: Cannot Shift-PgUp/Shift-PgDn or Ctrl-O from encrypted PDF without entering password or canceling and acceptingNavigating from encrypted PDF without entering password or canceling and accepting does not work as expected

comment:7 by Gregg Young, 8 years ago

It is working exactly as I would expect. Since it can't move forward to the encrypted document it remains (from the standpoint of its list) at the document you started from.Hence Shift PgUp seems to take you back 2 documents and for the same reason you can't get passed the encrypted document.

Cancel should not create an error message at all because presumably the user know he can't open the file and is giving up. If you want the option to skip the file it should probably be in the password dialog. You could also add text to the password dialog that explains Lucide's limitation re encrypted files. Cancel should probably only leave a blank screen if no other file is open. However this is much easier to talk about then to code.

OK should result in an error message. The message should be "incorrect password/unsupported encryption type" or such both together if we can determine the encryption type. Exiting the error should reopen the password dialog or at least have the option to do so. The password dialog has a help bottom now so make sure help covers all this. If we can gracefully determine that a file has an unsupported encryption type we should refuse to open it the same as when we don't have an appropriate plugin.

comment:8 by Lewis Rosenthal, 8 years ago

Yes, I understand it now. Shift-PgUp is taking us to the document one previous to the last one we were able to successfully load, which would be two up from where we failed/canceled/ignored the password prompt and did not load.

Do we distinguish between error messages and notifications? I need to look.

Cancel should leave us with a blank screen and no error message, because canceling by itself (deciding not to decrypt) is not an error, it's a user action. An incorrect password followed by OK should generate an error message, I agree.

Related: #317

comment:9 by Gregg Young, 6 years ago

Milestone: Future1.4.2
Note: See TracTickets for help on using tickets.