Skip to content
This repository was archived by the owner on Aug 5, 2026. It is now read-only.

docs(encrypt): explain password parsing issue with leading zeros in YAML front-matter - #50

Open
XuanRanDev wants to merge 3 commits into
evannotfound:mainfrom
XuanRanDev:patch-1
Open

docs(encrypt): explain password parsing issue with leading zeros in YAML front-matter#50
XuanRanDev wants to merge 3 commits into
evannotfound:mainfrom
XuanRanDev:patch-1

Conversation

@XuanRanDev

Copy link
Copy Markdown

This documentation update clarifies a potential issue in the Encrypt feature when using passwords that begin with leading zeros (e.g., 0429).

In the plugin’s encryption logic (scripts/filters/encrypt.js), passwords are converted to strings before encryption:

password = password.toString();

However, due to YAML’s default parsing behavior, unquoted numeric values such as:

password: 0429

are interpreted as integers (429) before reaching this conversion step.
As a result, the leading zero is lost and the password entered by the user (0429) will not match the decryption key (429).

To avoid this issue, the documentation now includes a clear note:

Tip: If your password contains leading zeros (e.g., 0429), wrap it in double quotes — for example: password: "0429"

Change type:

  • 📝 Documentation improvement (Encrypt section)

Add note about using quotes for passwords with leading zeros
Updated note formatting for password field instructions.
Added a tip for handling passwords with leading zeros.
@vercel

vercel Bot commented Nov 7, 2025

Copy link
Copy Markdown

@XuanRanDev is attempting to deploy a commit to the Evanovation Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant