aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/crypto.js
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2014-02-19 08:30:14 +0100
committerzottel <github@zottel.net>2014-02-19 08:30:14 +0100
commit79d3dae7fa80df6ea6914807bcde4d8b8c390361 (patch)
tree96327bd990038c66f0e644c505522cb424a1bbd0 /view/js/crypto.js
parent2bca2199112625593eb412584e17e874e71ca913 (diff)
parent24d119b8c4e94ed130577e4e4a8d17ea13c406ac (diff)
downloadvolse-hubzilla-79d3dae7fa80df6ea6914807bcde4d8b8c390361.tar.gz
volse-hubzilla-79d3dae7fa80df6ea6914807bcde4d8b8c390361.tar.bz2
volse-hubzilla-79d3dae7fa80df6ea6914807bcde4d8b8c390361.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'view/js/crypto.js')
-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.