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

[GENERIC viewer] Display a warning message, using the errorWrapper, for documents with signatures (PR 13214 follow-up, issue 13215) #13217

Merged
merged 1 commit into from Apr 11, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Apr 10, 2021

To simplify the overall implementation, given that it only applies to the GENERIC-viewer, this patch purposely re-uses the existing errorWrapper-functionality to display the message.
While that one is mostly intended for actual errors, by re-using it here we considerably reduce the amount of code/complexity necessary for supporting this new warning. It's obviously possible to re-factor/improve this later on, but the patch should do just fine here since it'll indeed inform users (of the GENERIC-viewer) about unverified signatures.

Finally this patch also tweaks the background-color of the errorWrapper, making it 20 percent lighter respectively darker (depending on the theme) to make it "stand out" a little bit less.[1] While it may perhaps be useful to re-style/re-factor the errorWrapper, this patch probably isn't the right place for doing that.

Fixes #13215


[1] Note how in the MOZCENTRAL-viewer, which instead uses the browser notification-bar, we're purposely using a neutral colour to not draw too much attention to the notification-bar.

… for documents with signatures (PR 13214 follow-up, issue 13215)

To simplify the overall implementation, given that it only applies to the GENERIC-viewer, this patch purposely re-uses the existing `errorWrapper`-functionality to display the message.
While that one is mostly intended for actual *errors*, by re-using it here we considerably reduce the amount of code/complexity necessary for supporting this new warning. It's obviously possible to re-factor/improve this later on, but the patch should do just fine here since it'll indeed inform users (of the GENERIC-viewer) about unverified signatures.

Finally this patch also tweaks the background-color of the `errorWrapper`, making it 20 percent lighter respectively darker (depending on the theme) to make it "stand out" a little bit *less*.[1] While it may perhaps be useful to re-style/re-factor the `errorWrapper`, this patch probably isn't the right place for doing that.

---
[1] Note how in the MOZCENTRAL-viewer, which instead uses the browser notification-bar, we're purposely using a neutral colour to not draw too much attention to the notification-bar.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/0087b1c2d4db549/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/0087b1c2d4db549/output.txt

Total script time: 4.39 mins

Published

@timvandermeij timvandermeij merged commit a3669a4 into mozilla:master Apr 11, 2021
@timvandermeij
Copy link
Contributor

Thank you for doing this! The error wrapper is actually better than I initially remembered in terms of styling, so I don't think we'll have to do anything about it for now.

@Snuffleupagus Snuffleupagus deleted the generic-signature-warn branch April 11, 2021 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a warning for unvalidated digital signatures in the generic viewer
3 participants