DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:encryptedpasswords

This is an old revision of the document!


Encrypted Passwords Plugin

Compatible with DokuWiki

2018-04-22, 2017-02-19,2016-06-26, 2015-08-10

plugin This plugin let you store 256 bit AES encrypted passwords in your DokuWiki pages. The password can be decrypted by clicking them.

Last updated on
2019-10-02
Provides
Syntax, Action
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with convert, encryption, password

NOTE: It seems like the email of the author (WR) is not responding anymore as of 20180427 (already mentioned in the “development” section below)

Javascript must be enabled.

Based on the encryption library by Vincent Cheung which incorporates the Gibberish AES library by Mark Percival

Download and Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Syntax and Usage

This plugin is useful if you want to store passwords directly within your page. The passwords are stored encrypted in the wiki source files, so nobody is able to find out the passwords through the file system.

To encrypt text, just select your text and click the toolbar button with the grey key: button icon. Use the same encryption key on one page, as decrypting affects all passwords on a page.

Example

If you select “foo … 58979” of the following text:

foo       password
π         3.14159265358979  <- enter the key "pass"

the text will be converted in the editor after encryption:

<decrypt>U2FsdGVkX1+ywWIRvsyuIS0u0rFLhNk5d2rudYrUayapebwKo7AdT/xgqilvb/Zu
5FdZupHudezVSbKhlF2tmg==</decrypt>  <- enter the key "pass"    

With version 2011-01-21 you can decrypt the text inside the editor by selecting a <decrypt>…</decrypt> block an pressing the button with the grey key.

Configuration and Settings

The plugin can be configured with the configuration manager in the admin menu.

reload_seconds Automatic page reload timeout (in seconds) after decryption to get back encrypted again.
Set 0 to disable auto-reload.
(default value = 120)

Decryption outside of this plugin

If for any reason in the future the decrypt should stop working (for example, javascript issues), you can still decrypt the encrypted test in this way (Linux syntax, but I think you can do it in Windows as well):

echo  'U2FsdGVkX1/oynrOig+RoUwMNCHvJH2bcmQeAq2xaLI=' | openssl base64 -d |openssl aes-256-cbc -d

You can test it with password “test” (without quotes) and you should get

hello world

Development

The plugin was first developed by Wolfgang Reszel, and had been available from:
www.werbeagentur-willers.de:!:Dead link to the zip file of version 2013-03-13

It found that the original download link and email contact are NOT reachable. For the moment, the plugin which is compatible with the DW “Ponder Stibbons” is available from:
https://github.com/ssahara/dw-plugin-encryptedpasswords/archive/master.zip
s.sahara 2014-07-07 09:07

Change Log from github repository

ToDo/Wish List

  • no immediate plan

Known Bugs and Issues

Does not work in Hrun

In version Hrun, it says I can enter the password twice to confirm, but after I click OK, it fails to let me enter the password again and nothing happens. Also the icon is blank and has no key image on it.

  • Hello, i could solved this problem with reinstalling this plugin. Maybe that solves your problem too?

Known Bugs and Issues until 2013-03-13 release

Does not escape HTML characters

Using jQuery's.html() will attempt to render unencrypted strings. The fix is simple, in jsencryption.js on line 46, change it to:

jQuery(c).text(e).after('<span class="recrypt"><a href="." onclick="location.reload(); return false;">['+enc_recrypt+']</a></span>');

Broken by Ponder Stibbons release

First off, it appears the author's email is no longer valid. Next, the Ponder Stibbons release broke the plugin and you can't encrypt anymore. the fix is simple, in jsencryption.js on line 29, change it to:

var selection = DWgetSelection(document.getElementById('wiki__text'));

Conflict with issuetracker

The 2011-01-21 version of encryptedpasswords conflicts with plugin:issuetracker 2011-12-13. With both plugins installed some browsers (eg. IE 8, Chrome 15) won't allow inline editing in issuetracker's tables.1) The conflict appears to be resolved by replacing the last few lines2) of encryptedpasswords/jsencryption.js with

if (!Array.indexOf) {
	Array.prototype.indexOf = function(a, b) {
		for (var i = (b || 0); i < this.length; i++) {
			if (this[i] == a) {
				return i
			}
		}
		return -1;		// needed for compatibility with issuetracker plugin [Rik, 2011-12-15]
	}
}
Thanks for the report. I updated the plugin for Dokuwiki Angua and also replaced the old Gibberish AES with the latest Version which has not that conflicting code. I hope this will fix this issue too. – Wolfgang

JS compression is breaking code

Hi, it seems that the JAVASCRIPT compression is breaking your code. At least I get an error in file jsencryption.js in line 95. Can you have a look into it. Thanks

Not compatible with Ponder Stibbons (?)

After dokuwiki update for Ponder Stibbons, I had problems when editing or creating encrypted content. I have not done an isolated test yet (new installation with this plugin only). As soon as I test it, I'll post the results. Thanks.

Fix for Ponder Stibbons release

Hi everyone, We only need to change a line in lib/plugins/encryptedpasswords/jsencryption.js file, line 29, I think in this new version, getSelection method is deprecated and now We have to use DWgetSelection, After you modify your file, the plugin works like a charm.

Before:

var selection = getSelection(document.getElementById('wiki__text'));

After

var selection = DWgetSelection(document.getElementById('wiki__text'));

Feature Requests

Thank you very much for this plugin, it is really a pleasure to use it. But after using it for a while i have two feature-requests, which would be nice to have. Maybe someone can implement them ;-).

1. If you decrypt something, the page hops to the top. This is anoying especially for long pages, would be nice if the page stays where it was.

2. If you decrypt something, everything with the same key will be decrypted too. Would be nice to set an option to choose if all are encrypted at once. I solved this temporary by adding an random generated number to the link, but thats not really well solved. Thank you very much.

3. I use a modified DW template with a black background (text color is white). Now, whenever I encode some password using this plugin, the little dots replacing the password are blue (as a link) and they are located inside a white rectangle (I guess this one is not visible on a white background). Upon decryption of the encoded password, the text is displayed in white inside the white rectangle and is thus unreadable (I can “ctrl+a” the page in order to read it but that's a little inconvenient)… Would there be a way for me to change that white rectangle into a black rectangle by modifying some preference value in some configuration file? If not, would there be a way for me to modify the color of the decrypted text from white to black inside this white rectangle, again by modifying some preference value in some configuration file? Thanks a lot, -a-

jin 2015-08-18 15:09 Great great plugin! thanks a lot! I've only a request to make that plugin perfect: When I decrypt the page if I export to PDF I export the encrypted password only, would be great to export to pdf the clear text passwords if they are decrpyted before. Thankyou very much!

5. Hi it is possible to make this plugin compatible with the plugin edtitable? https://www.dokuwiki.org/plugin:edittable The plugin edittable provide a nicer interface for editing table but the button encrypt doesn't respond in combination with edittable und encryptedpasswords

6. A global encryption key would be great rather than setting it for each password.

Digitalin 2016-06-24 21:28 - from my experience, if you use the same password in a page for many different encrypted strings, it works. I mean, using the same password, all the encrypted strings with a unique password are displaying. This is in the case you don't want encrypt all the page because you want to organize a page with titles, infos and so on. Great plugin !
1)
See issue 33 for more information.
2)
Starting near line 961.
plugin/encryptedpasswords.1570017663.txt.gz · Last modified: 2019-10-02 14:01 by s.sahara

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki