DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:dokucrypt2

This is an old revision of the document!


dokucrypt2 Plugin

Compatible with DokuWiki

2017-02-19b+

plugin A plugin to support client side cryptography.

Last updated on
2017-11-08
Provides
Admin
Repository
Source
Conflicts with
aceeditor, fastwiki

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

Security warning (please read plugin security guidelines): This extension requires patching the DokuWiki core. Manual patches may break compatibility with other extensions and make it harder to secure your installation by upgrading to the latest version.

Similar to dokucrypt

Tagged with encryption, password

By Scott Moser (smoser@brickies.net), maintained by Sherri W. (@SherriOnline / http://SyntaxSeed.com)

:!: This replaces the: Original DokuCrypt Plugin.

Installation

This is a newly maintained version of the DokuCrypt plugin. It is fully patched for the latest version of Dokuwiki (last tested on Release 2017-02-19b “Frusterick Manners”).

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

Note: I have copied and updated this plugin due to it being very important for my day-to-day use. The original author hasn't touched it in years, and I hope he won't mind. 8-)

:!: Requires patches after install, see below.

Sherri 2017-06-26 04:45

PATCH 1: Resolving problems with toolbar header buttons

The header buttons in the editor toolbar are not working.

Here is the patch for version 2017-02-19b+:

--- \lib\scripts\edit-original.js
+++ \lib\scripts\edit.js
@@ -143,16 +143,17 @@
  * @author Andreas Gohr <gohr@cosmocode.de>
  */
 function currentHeadlineLevel(textboxId){
     var field = jQuery('#' + textboxId)[0],
         s = false,
         opts = [field.value.substr(0,getSelection(field).start)];
-    if (field.form.prefix) {
-        // we need to look in prefix context
-        opts.push(field.form.prefix.value);
-    }
+        //if (field.form.prefix) {  // Dokucrypt Plugin Mod
+        if (field.form && field.form.prefix) {  // Dokucrypt Plugin Mod
+            // we need to look in prefix context
+            opts.push(field.form.prefix.value);
+        }
 
     jQuery.each(opts, function (_, opt) {
         // Check whether there is a headline in the given string
         var str = "\n" + opt,
             lasthl = str.lastIndexOf("\n==");
         if (lasthl !== -1) {

Posted by: — Sherri 2017/11/08 10:12

Manual Patch Instructions

  1. In the file /lib/scripts.edit.js
  2. Find the section: function currentHeadlineLevel(textboxId){
  3. Inside that section (function), find: if (field.form.prefix) {
  4. Change it to: if (field.form && field.form.prefix) {
  5. That's it.
  6. You may need to shift+refresh the page after changing this file.

About

dokucrypt is a client side (javascript) cryptography plugin. This plugins allows a user to store and access sensitive data in a dokuwiki. All sensitive data is encrypted before it is submitted and decrypted on the clients machine. A users' sensitive data will only be accessible when viewed with a javascript enabled browser and the proper pass phrase. It will never be transmitted or stored in plain text, and you will avoid having passwords and sensitive data stored in plain text on the server.

The Javascrypt (http://www.fourmilab.ch/javascrypt/) library is used for encryption and decryption to provide 256 Bit AES encryption.

Usage

Entering Encrypted Data

In order to encrypt some sensitive data, the user needs to add text like the following

Hi world.  I have a secret.  Can you read it?
< SECRET>I like ice cream< /SECRET>
  • Note: the space before 'SECRET' must be removed

When the user hits 'Save' (or a draft is attempted to be saved) a prompt will open, asking the user to enter a pass phrase key for the encryption. Once supplied, the encryption will be done in the browser and the encrypted text submitted to the server.

Viewing Encrypted Data

When the page is viewed, the user will see the encrypted text and a link 'Decrypt Encrypted Text' will appear which will prompt the user for a password and decrypt the text (see the example below).

The encrypted text is compatible with javascrypt decryption (http://www.fourmilab.ch/javascrypt/jscrypt.html).

Editing Encrypted Data

To edit the encrypted data, the user needs to Edit the wiki page. When first loaded, encrypted text will appear encrypted, surrounded by <ENCRYPTED> and </ENCRYPTED> tags. To edit this text, the user needs to press the 'DecryptSecret' button between 'Save' and 'Preview', and supply the correct pass phrase. The encrypted text will be decrypted to the 'SECRET' form showed above, and the use can edit in plaintext. Submits or drafts will be encrypted before submission with the same pass phrase supplied.

Known Issues / Feature Requests

  • The password prompt box should be an actual masked password field. yes, this should be a must have!Django 2018-02-21 12:51
    • This is/was a known issue with the original plugin. It would require a major fix to replace the basic js prompt with a custom popup. Not something I have time to do at the moment. — Sherri 2018-02-21 21:50
  • When encrypted text includes DokuWiki markup (eg a bulleted list, or headings), can it be possible to have it rendered correctly when decrypted, instead of just showing the plain text? DanMundy 2018-03-15 09:49

Releases

  • 2017-06-25 - Fork the original plugin. Patch it up. Release for most recent DokuWiki version. Cheers!
  • 2017-11-08 - Fixed an issue with the heading buttons 'PATCH 1' required (above). Added plugin info text file.

Bugs - Please Itemize Bugs Here (newest at top)

(FIXED) Bug 3: Heading tool bar buttons not working.

A user emailed me to report that some js exceptions were being thrown when using the heading tool bar buttons.

Response

  • Some changes to the plugin have been made, and a PATCH 1 is available above to make a small change to DokuWiki's code itself. These are required to fix this issue. — Sherri 2017-11-08 16:10
    • Is this fix still working? I am running the latest version of the plugin, and DokuWiki Release 2017-02-19e “Frusterick Manners”, applied the patch, but still the heading buttons aren't working. DanMundy 2018-03-15 10:42
      • Works for me in Release 2017-02-19b “Frusterick Manners”. Can't test other versions at the moment, because swamped. But I welcome anyone willing to help. — Sherri 2018-10-01 20:31

(IN REVIEW) Bug 2: Update required ?

2017-10-15:
After installation via 'do=admin&page=extension&tab=search&q=' from within dokuwiki I get a warning for pending update:

Update: Version 2017-06-26 steht zum Download bereit.

Response

  • I have released a new version. I'm hoping that adding the plugin info will fix this so that DokuWiki knows what the latest version is supposed to be. — Sherri 2017-11-08 16:10

(FIXED) Bug 1: GetInfo not implemented.

after fresh install:

getInfo() not implemented in action_plugin_dokucrypt2 and /home/voa/htdocs/wiki/lib/plugins//dokucrypt2/plugin.info.txt not found.
Verify you're running the latest version of the plugin. If the problem persists, send a bug report to the author of the dokucrypt2 plugin.

Response

  • This is fixed. As of the version 2017-08-11 I have added the plugin info file. — Sherri 2017-11-08 16:10
plugin/dokucrypt2.1538418749.txt.gz · Last modified: 2018-10-01 20:32 by sherri

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