From 8219b9a0f348c70a16a5417ba9ee46f962619712 Mon Sep 17 00:00:00 2001 From: toastie89 Date: Thu, 5 Oct 2023 16:30:10 +0200 Subject: [PATCH] Added GUEST_PASSWORD to README (#80) * Added GUEST_PASSWORD to README * comment out and reject default value --------- Co-authored-by: Wingy --- README.md | 5 ++++- src/config/index.js | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 93c202b..5acb686 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,9 @@ UPDATE_CHECK=true PFP=true # Language of the interface, options listed in `languages` directory LANGUAGE=en-US +# Password to enter guest mode, +# e.g. https://wishes.example.com?pw=ReplaceWithYourGuestPassword +# GUEST_PASSWORD=ReplaceWithYourGuestPassword ## Wishlist Settings # Set to true to not allow users to have their own lists. You may want this for a birthday or wedding. @@ -144,4 +147,4 @@ As of writing, there are no code contributors to the main project. However, ther * Czech: [drSchaps](https://github.com/drSchaps) * German: [PeteS4](https://github.com/PeteS4) * French: [zethis](https://github.com/zethis) -* Spanish: [CantisW](https://github.com/CantisW) \ No newline at end of file +* Spanish: [CantisW](https://github.com/CantisW) diff --git a/src/config/index.js b/src/config/index.js index 1ee79e9..ef5a267 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -25,3 +25,7 @@ module.exports = { } if (module.exports.guestPassword) module.exports.wishlist.public = false +if (module.exports.guestPassword === 'ReplaceWithYourGuestPassword') { + console.error('Error: Guest password should be changed from default.') + process.exit(1) +} \ No newline at end of file