Skip to content

Commit

Permalink
Bug: 12890 Fix unencrypting and saving a previously encrypted note.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jan 27, 2014
1 parent f9748a2 commit e49e7a3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mnemo/memo.php
Expand Up @@ -166,10 +166,6 @@ function showPassphrase($memo)
$storage = $GLOBALS['injector']->getInstance('Mnemo_Factory_Driver')->create($memolist_original);
break;
} else {
if (!strlen($memo_passphrase)) {
$memo_passphrase = Mnemo::getPassphrase($memo_id);
}

/* If $memo_id is set, we're modifying an existing note. Otherwise,
* we're adding a new note with the provided attributes. */
if (!empty($memo_id)) {
Expand Down Expand Up @@ -198,8 +194,7 @@ function showPassphrase($memo)
}
}
$memo_desc = $storage->getMemoDescription($memo_body);
if (empty($memo_passphrase) &&
Horde_Util::getFormData('memo_encrypt') == 'on') {
if (!strlen($memo_passphrase) && Horde_Util::getFormData('memo_encrypt') == 'on') {
$memo_passphrase = Mnemo::getPassphrase($memo_id);
}
try {
Expand Down

0 comments on commit e49e7a3

Please sign in to comment.