a-nau / password-protected-website-template

Template to create and host a simple password-protected website with Github Pages.
https://a-nau.github.io/password-protected-website-template/
MIT License
48 stars 16 forks source link

Fixed javascript embedding #9

Open IanMaquignaz opened 3 months ago

IanMaquignaz commented 3 months ago

Fixes (partially) #8

Warning!

IanMaquignaz commented 2 months ago

That is not the case, no changes are required.

1. b64encode() does not refer to base64.b64encode()

It refers to this function which encodes the file. This is not a new function, it's part the of the original codebase

def b64encode(path: Path) -> str:
    return base64.b64encode(path.open("rb").read()).decode()

2. Decode by defaults decodes to utf-8

bytearray.decode(encoding='utf-8', errors='strict')