mindcruzer / pelican-encrypt-content Goto Github PK
View Code? Open in Web Editor NEWa pelican plugin to password protect content
License: MIT License
a pelican plugin to password protect content
License: MIT License
Hey,
Pycryto is deprecated in 3.7 and incompatible with python 3.8 (pycrypto/pycrypto#283).
It could be easily replaced by PyCrytodome (https://github.com/Legrandin/pycryptodome) without extra code.
I've made the fix on my side (with some test fixes): https://github.com/nphilou/pelican-encrypt-content. Please let me know if you're still maintaining this repo.
Ok sorry to be a tad schizophrenic...but I'm now trying to use the encrypt plugin on a different site which uses the pelican-octopress theme.
Here, make html
is failing with the following error:
CRITICAL: encrypt_content/content.html make: *** [/home/fsuser/encrypt_pelican_octopress_test/output/index.html] Error 1
The files in the pelican-octopress theme don't all seem to correspond to the ones described in the README of this repo. E.g., there are quite a few files in an _include
subdirectory. Not sure if that is the problem here or not.
Any thoughts?
Thanks very much,
john
Hi.
The plugin is really excellent.
However an issue I have found is that it seems to prevent tools such as mathjax and bigfoot.js from rendering properly on password-protected pages. This a real problem for me as I have
a lot of equations on some of my pages, and without proper mathjax rendering it leaves the content pretty useless.
I'm afraid I am almost completely ignorant of javascript (I think this is a javascript problem, although not certain); so can't really troubleshoot this much myself. Do you agree with my diagnosis and do you know of a fix?
Ta.
I am facing a problem where, the change to article title is works fine but the article content shows the original content.
I tried to debug the encrypt_content()
method. The method sets content._content
correctly. Looks to me somewhere it is overwritten to original content.
I currently have the following plugins activated
-> Plugins found:
| pelican.plugins.render_math
| pelican.plugins.encrypt_content
pelican --version
4.5.0
I really like the idea of having encrypted pages for some use-cases. However, I noticed that while text and therefore the references to images are encrypted, the images themselves are not (and most of the time have quite deterministic filenames, which is not the fault of this plugin).
Therefore, it'd be awesome if also images (and maybe even other files) get encrypted and then decrypted on the client.
I'm not sure if this would work well with the other image plugins out there, but I wanted to share this idea as a feature request.
great work!
but i come across a UnicodeEncodeError
when i want to publish my site.
i think there should be a plaintext.encode
in protect_content.py
but i am not quite sure if it is alright.
thx
Hi.
Thanks for the plugin. This is exactly what I need.
However it's not working for me yet.
I think I have followed the steps correcting, but am getting the following error when I type make html
:
CRITICAL: encrypt-content-content.html
make: *** [html] Error 1
Any idea what the problem might be?
Ta,
john
Doesn't seem to support python 3 types, test file outputs
$ python3 test_encrypt_content.py
EE
======================================================================
ERROR: test_encrypt_text_aes (__main__.TestEncryptContent)
Verify that the ciphertext is actually decryptable.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_encrypt_content.py", line 36, in test_encrypt_text_aes
self.assertEqual(plaintext.decode('utf-8').rstrip(padding_char), text)
TypeError: rstrip arg must be None or str
======================================================================
ERROR: test_hash_md5 (__main__.TestEncryptContent)
Verify that md5 hashes are being computed correctly.
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_encrypt_content.py", line 19, in test_hash_md5
self.assertEqual(md5_bytes.encode('hex'), '098f6bcd4621d373cade4e832627b4f6')
AttributeError: 'bytes' object has no attribute 'encode'
----------------------------------------------------------------------
Ran 2 tests in 0.001s
FAILED (errors=2)
Hi,
Thanks for this plugin. I've found today that I cannot link to other pages on my blog properly if the link is behind the password. The html address isn't created and instead the path to the file remains.
-- John
Hi! Thanks for a very useful feature which I really want to get working!
I am quite sure I am doing this wrong, but how am I supposed to organize the plugin folders so that (1) I don't get the AttributeError: module 'pelican-encrypt-content' has no attribute 'register'
error or (2) a ModuleNotFoundError
when generating the pelican content?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.