Remove the password prompt input type hack
The browsers have become smarter and made this hack no longer functional. Since this is now enforced by practically all browsers, there is nothing more we can do about this. It is up to the user to serve the viewer over HTTPS or deal with the warning. Note that this is in no way specific for PDF.js. Any site with password inputs served over HTTP has this problem right now. This hack was provided as a convenience for the users, but nothing more than that.
This commit is contained in:
parent
e3796f6f41
commit
dfd338a399
@ -60,7 +60,6 @@ class PasswordPrompt {
|
|||||||
|
|
||||||
open() {
|
open() {
|
||||||
OverlayManager.open(this.overlayName).then(() => {
|
OverlayManager.open(this.overlayName).then(() => {
|
||||||
this.input.type = 'password';
|
|
||||||
this.input.focus();
|
this.input.focus();
|
||||||
|
|
||||||
var promptString = mozL10n.get('password_label', null,
|
var promptString = mozL10n.get('password_label', null,
|
||||||
@ -78,7 +77,6 @@ class PasswordPrompt {
|
|||||||
close() {
|
close() {
|
||||||
OverlayManager.close(this.overlayName).then(() => {
|
OverlayManager.close(this.overlayName).then(() => {
|
||||||
this.input.value = '';
|
this.input.value = '';
|
||||||
this.input.type = '';
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,8 +307,7 @@ See https://github.com/adobe-type-tools/cmap-resources
|
|||||||
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
|
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- The type="password" attribute is set via script, to prevent warnings in Firefox for all http:// documents. -->
|
<input type="password" id="password" class="toolbarField">
|
||||||
<input id="password" class="toolbarField">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="buttonRow">
|
<div class="buttonRow">
|
||||||
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
|
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
|
||||||
|
Loading…
Reference in New Issue
Block a user