D0n9X1n / hexo-blog-encrypt

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

Can't use it in Chrome or Edge #133

Closed zhjiang22 closed 4 years ago

zhjiang22 commented 4 years ago

Issue

I use hexo-blog-encrypt, and setting it as README say, but there are some problem with it. When I use Chrome in Mac or Win10, or Edge in Win10, and enter the correct password, it can't jump to blog page. But only when I use Safari in Mac, it can work correctly.

Expected Behavior

When I enter the correct password and press Enter, it should jump to the blog page.

Actual Behavior

It doesn't works on Chrome or Edge.

The Error is this:

Uncaught (in promise) TypeError: Cannot read property 'importKey' of undefined
    at getKeyMaterial (blog-encrypt.js:94)
    at HTMLDivElement.<anonymous> (blog-encrypt.js:255)

Steps to Reproduce the Problem

1.

 npm install --save hexo-blog-encrypt
  1. ---
    title: Hello World
    date: 2016-03-30 21:18:02
    password: mikemessi
    ---
  2. # Security
    encrypt: # hexo-blog-encrypt
    abstract: Here's something encrypted, password is required to continue reading.
    message: Hey, password is required here.
    tags:
    - {name: encryptAsDiary, password: passwordA}
    - {name: encryptAsTips, password: passwordB}
    template: <div id="hexo-blog-encrypt" data-wpm="{{hbeWrongPassMessage}}" data-whm="{{hbeWrongHashMessage}}"><div class="hbe-input-container"><input type="password" id="hbePass" placeholder="{{hbeMessage}}" /><label>{{hbeMessage}}</label><div class="bottom-line"></div></div><script id="hbeData" type="hbeData" data-hmacdigest="{{hbeHmacDigest}}">{{hbeEncryptedData}}</script></div>
    wrong_pass_message: Oh, this is an invalid password. Check and try again, please.
    wrong_hash_message: Oh, these decrypted content cannot be verified, but you can still have a look.

    Specifications:

    My blog Page is this: My blog And the password is Sylvan

Thank you, very much. (The version of the project, operating system, hardware etc.)