Skip to content

Commit 09c7967

Browse files
committed
CoinK0in: fix removing of search locations in "encrypted" mode
1 parent c468304 commit 09c7967

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Install the package from source with pip:
6969
```bash
7070
cd mkdocs-encryptcontent-plugin/
7171
python setup.py sdist bdist_wheel
72-
pip install --force-reinstall --no-deps dist/mkdocs_encryptcontent_plugin-2.5.0-py3-none-any.whl
72+
pip install --force-reinstall --no-deps dist/mkdocs_encryptcontent_plugin-2.5.1-py3-none-any.whl
7373
```
7474

7575
Enable the plugin in your `mkdocs.yml`:
@@ -600,7 +600,7 @@ and would be able to download them despite not having the password to the page.
600600

601601
This feature should make it impossible or at least way harder for an external attacker to guess the file names.
602602
Please also check and disable directory listing for that matter.
603-
Keep in mind that you hosting provider is still able to see all your images and files.
603+
Keep in mind that your hosting provider is still able to see all your images and files.
604604

605605
To counter file name guessing you could active the feature like this:
606606

@@ -630,7 +630,7 @@ Otherwise, you'd need to change these file names to the obfuscated ones.
630630

631631
The file names are obfuscated in a way that the corresponding file is hashed with MD5
632632
and the hash is added to the file name
633-
(If the file content is not changed the file name also not changes), like this:
633+
(If the file content is not changed the file name remains the same), like this:
634634

635635
some_image_1_bb80db433751833b8f8b4ad23767c0fc.jpg
636636
("bb80db433751833b8f8b4ad23767c0fc" being the MD5 hash of said image.)

encryptcontent/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def on_post_build(self, config, **kwargs):
626626
if entry['location'] == location or entry['location'].startswith(location+"#"): #find the ones located at encrypted pages
627627
page_password = self.setup['locations'][location][0]
628628
if self.config['search_index'] == 'encrypted':
629-
search_entries.remove(entry)
629+
search_entries['docs'].remove(entry)
630630
elif self.config['search_index'] == 'dynamically' and page_password is not None:
631631
#encrypt text/title/location(anchor only)
632632
text = entry['text']

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def read(fname):
1111

1212
setup(
1313
name='mkdocs-encryptcontent-plugin',
14-
version='2.5.0',
14+
version='2.5.1',
1515
author='unverbuggt',
1616
author_email='[email protected]',
1717
description='A MkDocs plugin that encrypt/decrypt markdown content with AES',

0 commit comments

Comments
 (0)