aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-18 19:17:45 -0800
committerfriendica <info@friendica.com>2014-02-18 19:17:45 -0800
commita258c8b98b019924e0b6ff28941599b80490e4d6 (patch)
tree0f695a562132dad2efd7e10691f47bb66102feb0 /view
parent87bb568d678c88efacc5d849af7a474e8efc9359 (diff)
parent2e305742faf5aefa59f944bf7f011feb93ba497a (diff)
downloadvolse-hubzilla-a258c8b98b019924e0b6ff28941599b80490e4d6.tar.gz
volse-hubzilla-a258c8b98b019924e0b6ff28941599b80490e4d6.tar.bz2
volse-hubzilla-a258c8b98b019924e0b6ff28941599b80490e4d6.zip
Merge https://github.com/friendica/red into zpull
Diffstat (limited to 'view')
-rw-r--r--view/js/crypto.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/view/js/crypto.js b/view/js/crypto.js
index 2e6402c62..c3a37d177 100644
--- a/view/js/crypto.js
+++ b/view/js/crypto.js
@@ -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.