v1.92.0 - Multiple bug fixes and security updates
Added:
- Better Environment Variable Handling:
- All integer and string environment variables now use proper default fallbacks. For example, using:
ensures that if an environment variable is set but empty, a default value is used.
PW_LENGTH = int(os.getenv('PW_LENGTH', '12') or '12')
- All integer and string environment variables now use proper default fallbacks. For example, using:
- Dynamic "Max Word Length" Dropdown in UI:
- The dropdown in
index.html
for selecting the maximum word length now dynamically includes the environment-defined value if it isn’t already present in the default options. #90
- The dropdown in
- Multi-arch Docker Build Support:
- Updated Docker workflows (
.github/workflows/ci-dev.yml
and.github/workflows/docker-publish.yml
) to enable multi-architecture builds (amd64 and arm64) by configuring QEMU and Docker Buildx accordingly.
- Updated Docker workflows (
- Dependabot Configuration Update:
- Updated the Dependabot configuration (
.github/dependabot.yml
) to include GitHub Actions and adjust schedule intervals (e.g., changing pip update interval from daily to weekly) for improved dependency management.
- Updated the Dependabot configuration (
- French Wordlist Support:
- Added support for a French wordlist by reading from
wordlist_fr.txt
inconfig.py
. - Updated language handling in
handlers/request_handler.py
andutils/password_utils.py
(using match-case syntax) to supportfr
as a valid language. - Modified the language selection dropdown in
index.html
to include French as an option. - #86 Added env variable for local wordlist. This implementation is a temporary one, as it disables default English language when used. Example usage:
- Added support for a French wordlist by reading from
docker run -d -p 5069:5069 -e PP_LOCAL_WORDLIST=/app/custom_wordlist.txt -v "A:\german.txt:/app/custom_wordlist.txt" jocxfin/pwgen:latest
Changed:
- Dependabot and CI/CD Workflow Enhancements:
- Adjusted schedule intervals and package ecosystems in the Dependabot configuration.
- Refactored CI/CD workflows to include multi-arch build support, ensuring consistent builds across different architectures.
- Language Handling in Password Generation:
- Refactored the language logic in
utils/password_utils.py
using Python’smatch-case
syntax to cleanly handle multiple languages (including French) without forcing custom wordlists.
- Refactored the language logic in
Fixed:
- Empty Environment Variable Fallbacks:
- Resolved issues where empty environment variables (e.g.,
PP_MAX_WORD_LENGTH=''
) causedValueError
during integer conversion by using fallback defaults.
- Resolved issues where empty environment variables (e.g.,
- Minor Refactorings and Bug Fixes:
- Improved handling in
request_handler.py
with helper functions for safe integer conversion. - Adjusted UI elements to always honor environment-defined settings while allowing user overrides.
- Multiple CVEs.
- Improved handling in
Thanks to @veerendra2 for the multi-arch Docker build and Dependabot configuration updates, and to @JeromeSpilmont for adding French wordlist support!
To use:
docker pull jocxfin/pwgen:latest
docker run -d -p 5069:5069 jocxfin/pwgen:latest
Offline mode:
docker pull jocxfin/pwgen:latest
docker run -d -e NO_API_CHECK=true -p 5069:5069 jocxfin/pwgen:latest
With environmental variables defining settings:
docker pull jocxfin/pwgen:latest
docker run -d -p 5069:5069 \\
-e NO_API_CHECK=false \\
-e PW_LENGTH=12 \\
-e PW_INCLUDE_UPPERCASE=false \\
-e PW_INCLUDE_DIGITS=false \\
-e PW_INCLUDE_SPECIAL=false \\
-e PW_EXCLUDE_HOMOGLYPHS=true \\
-e PP_WORD_COUNT=4 \\
-e PP_CAPITALIZE=false \\
-e PP_SEPARATOR_TYPE=dash \\
-e PP_USER_DEFINED_SEPARATOR='' \\
-e PP_MAX_WORD_LENGTH=12 \\
-e PP_INCLUDE_NUMBERS=false \\
-e PP_INCLUDE_SPECIAL_CHARS=false \\
-e PP_LANGUAGE=en \\
-e PP_HIDE_LANG=false \\
-e PP_LANGUAGE_CUSTOM='' \\
-e MULTI_GEN=true \\
-e GENERATE_PP=true \\
-e ROBOTS_ALLOW=false \\
-e GOOGLE_SITE_VERIFICATION='' \\
-e DISABLE_URL_CHECK=false \\
-e BASE_PATH='' \\
-e PP_LOCAL_WORDLIST=/app/custom_wordlist.txt \\
-v "A:\german.txt:/app/custom_wordlist.txt" \\
jocxfin/pwgen:latest
Quick and straightforward improvements for a better tool.