mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 05:35:12 +00:00
Let user cancel the red_encrypt dialogue
If the user press cancel on the prompt also cancel the encryption. Maybe should also add this to passhint promt.
This commit is contained in:
parent
bee287f859
commit
aa44d3abab
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
|||
|
||||
|
||||
function str_rot13 (str) {
|
||||
// http://kevin.vanzonneveld.net
|
||||
// + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
|
||||
|
@ -43,7 +42,11 @@ function red_encrypt(alg, elem,text) {
|
|||
|
||||
// key and hint need to be localised
|
||||
|
||||
var enc_key = bin2hex(prompt(aStr['passphrase']));
|
||||
var passphrase = prompt(aStr['passphrase']);
|
||||
// let the user cancel this dialogue
|
||||
if (passphrase == null)
|
||||
return false;
|
||||
var enc_key = bin2hex(passphrase);
|
||||
|
||||
// If you don't provide a key you get rot13, which doesn't need a key
|
||||
// but consequently isn't secure.
|
||||
|
|
Loading…
Reference in a new issue