D0n9X1n / hexo-blog-encrypt

Yet, just another hexo plugin for security.
https://www.npmjs.com/package/hexo-blog-encrypt
MIT License
989 stars 102 forks source link

bug when using encryption on two tags #126

Closed shj37 closed 4 years ago

shj37 commented 4 years ago

$ X5XD`KV~1JKK QZ@O87}1

Issue

When using encryption on two tags, there will be one post's encryption not protected. Also the password set for the first tag apply to BOTH tags, the second tag's password not work

Expected Behavior

https://eduunited.org/2019/12/25/as-econ-mc-inflation/ https://eduunited.org/2019/12/25/econ-command-words/ These two links use the same encryption, their protection works. https://eduunited.org/2019/12/26/a2-econ-by-topic-circular-flow/ This link uses a different encryption, but the protection failed.

When tested locally, the encryption at 2019/12/25/econ-command-words/ and 2019/12/26/a2-econ-by-topic-circular-flow/, but failed at 2019/12/25/as-econ-mc-inflation/

Then after I added another encrypted page https://eduunited.org/2019/12/26/a2-econ-essay-developing/, only https://eduunited.org/2019/12/25/as-econ-mc-inflation/ failed. So it seems the problem is when two tags are encrypted, there is one post not protected. Thank you.

Actual Behavior

Steps to Reproduce the Problem

  1. _
  2. _
  3. _

Specifications

(The version of the project, operating system, hardware etc.) "hexo-blog-encrypt": "^3.0.6"

D0n9X1n commented 4 years ago

It's not a bug but a feature~ :)

Due to AES, it's impossible to encrypt a blog with two or more different passwords.

In this plugin, we don't recommend you to use two encryption tags to encrypt a blog, it will cause uncerstain results(Not sure which password will be used, need to read the hexo g log).