From a268422e9d5409e2d98af1769b495836a1ea5983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E8=B6=8A?= <44216455+cyicz123@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:12:21 +0800 Subject: [PATCH 1/2] fix(Doc): fix escaping issue for PASSWORD_HASH in docker-compose.yml For users using docker-compose.yml, please note that you should not wrap the generated hash password in single quotes. Instead, replace each `$` symbol with two `$$` symbols. For example, for the password 'foobar123', use the following command to generate the hash: `docker run ghcr.io/wg-easy/wg-easy wgpw foobar123` The resulting hash should be used in docker-compose.yml like this: ``` yaml - PASSWORD_HASH=$$2y$$10$$hBCoykrB95WSzuV4fafBzOHWKu9sbyVa34GJr8VV5R/pIelfEMYyG ``` Signed-off-by: cyicz123 --- How_to_generate_an_bcrypt_hash.md | 10 +++++++++- docker-compose.yml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/How_to_generate_an_bcrypt_hash.md b/How_to_generate_an_bcrypt_hash.md index 1a6a63c6..e77e3717 100644 --- a/How_to_generate_an_bcrypt_hash.md +++ b/How_to_generate_an_bcrypt_hash.md @@ -16,7 +16,7 @@ docker run ghcr.io/wg-easy/wg-easy wgpw YOUR_PASSWORD PASSWORD_HASH='$2b$12$coPqCsPtcFO.Ab99xylBNOW4.Iu7OOA2/ZIboHN6/oyxca3MWo7fW' // literally YOUR_PASSWORD ``` -*Important* : make sure to enclose your password in **single quotes** when you run `docker run` command : +**Important** : make sure to enclose your password in **single quotes** when you run `docker run` command : ```bash $ echo $2b$12$coPqCsPtcF <-- not correct @@ -26,3 +26,11 @@ b2 $ echo '$2b$12$coPqCsPtcF' <-- correct $2b$12$coPqCsPtcF ``` + +**Important** : Please note: don't wrap the generated hash password in single quotes when you use `docker-compose.yml`. Instead, replace each `$` symbol with two `$$` symbols. For example: + +``` yaml +- PASSWORD_HASH=$$2y$$10$$hBCoykrB95WSzuV4fafBzOHWKu9sbyVa34GJr8VV5R/pIelfEMYyG +``` + +This hash is for the password 'foobar123', obtained using the command `docker run ghcr.io/wg-easy/wg-easy wgpw foobar123` and then inserted an additional `$` before each existing `$` symbal. diff --git a/docker-compose.yml b/docker-compose.yml index f4c93c4a..dd450ed9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: - WG_HOST=raspberrypi.local # Optional: - # - PASSWORD_HASH='$2y$10$hBCoykrB95WSzuV4fafBzOHWKu9sbyVa34GJr8VV5R/pIelfEMYyG' (hash of 'foobar123'; see "How_to_generate_an_bcrypt_hash.md" for generate the hash) + # - PASSWORD_HASH=$$2y$$10$$hBCoykrB95WSzuV4fafBzOHWKu9sbyVa34GJr8VV5R/pIelfEMYyG (needs double $$, hash of 'foobar123'; see "How_to_generate_an_bcrypt_hash.md" for generate the hash) # - PORT=51821 # - WG_PORT=51820 # - WG_CONFIG_PORT=92820 From 0bf266d5cb77d754b450d91545c792a6314a87d5 Mon Sep 17 00:00:00 2001 From: NPM Update Bot Date: Mon, 12 Aug 2024 08:56:59 +0000 Subject: [PATCH 2/2] npm: package updates --- src/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index a07c2bbd..52d1e5f1 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -2658,9 +2658,9 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", "engines": {