cosmocode / dokuwiki-plugin-encryptedpasswords

Store 256 bit AES encrypted text in your DokuWiki pages. by Wolfgang Reszel
https://www.dokuwiki.org/plugin:encryptedpasswords
GNU General Public License v2.0
1 stars 6 forks source link

Encryption and decryption do not work in edit mode #12

Closed kuzmandi closed 10 months ago

kuzmandi commented 1 year ago

Since upgrading to Igor and a recent version of the Encrypted Passwords Plugin, I have the following behavior:

I can decrypt passwords saved in previous versions with no problem. If I click on the field with the dots and enter the passphrase it is copied to the clipboard, if I click on the lock and enter the passphrase it is displayed. When I edit the wiki page I see what I saw earlier also, the encrypted text inside tags. This is also how the file is stored on disk.

I only noticed that something was wrong when I wanted to change/add a password. In the edit mode of the wiki page nothing works:

When I click on the key icon ("Add password") tags are inserted or the selected text is enclosed with these tags. When saving the wiki page it will ask for a passphrase, the text will be saved unchanged (and readable) with the tags on disk. So in my case like this:

====== New test page ======
<encrypt>strictly_secret_text</encrypt>

But the wiki pages saved from earlier look like this:

====== Existing page ======
<decrypt>XD5PGTU [...] </decrypt>

When I click on the decrypt icon ("Decrypt all entries") nothing happens, no matter if I selected text or not.

Please support me in this matter, I am grateful for any help.

DeanCording commented 1 year ago

I've looked into this a little bit and it appears that the encryption handler isn't being connected to the Save button Click event. Not sure why, but this plugin is the only one I could find that works this way, so it's not surprising it broke.

smarteyesi commented 1 year ago

the same happens with subsection edits (made possible by either FastWiki or WiderEdit plugin).

There are 2 scenario's which sometimes happens: 1) the passwords are not encrypted even though the password popup field has been shown 2) you cannot click on the lock (to indicate you want to encrypt the passwords)

Editing the page in full mode is the only way to encrypt the passwords... (Sometimes first needin to fully decrypt the page and afterwards encrypting it again) Off course, you'll loose safety here as the passwords will first be stored unencrypted before being able to encrypt them again...

splitbrain commented 1 year ago

Are you guys all using the fastwiki plugin?

DeanCording commented 1 year ago

Are you guys all using the fastwiki plugin?

Yes, and I can confirm that issue disappears if I disable the fastwiki plugin

smarteyesi commented 1 year ago

@DeanCording we have sponsored the fix for this plugin to work with the fastwiki plugin. It should be published soon

DeanCording commented 1 year ago

Can confirm that the update fixes this problem with fastwiki. Thanks