perf: random password exclude some char

pull/15738/head
ibuler 2025-07-16 19:31:06 +08:00 committed by 老广
parent 3af188492f
commit 44d77ba03f
2 changed files with 10 additions and 2 deletions

View File

@ -21,7 +21,7 @@ class PasswordStrategy(models.TextChoices):
random_all = 'random_all', _('All assets use different random password')
string_punctuation = '!#$%&()*+,-.:;<=>?@[]^_~'
string_punctuation = '!#$%&()*+,-.:;<=?@[]_~'
DEFAULT_PASSWORD_LENGTH = 30
DEFAULT_PASSWORD_RULES = {
'length': DEFAULT_PASSWORD_LENGTH,

View File

@ -14,8 +14,16 @@ if [[ $1 == "root" ]];then
BASE_DIR="${BASE_DIR}/jumpserver"
fi
for file in $to_files; do
if [[ "$1" == "clean" ]];then
echo "Clean $file"
file_path="${BASE_DIR}/$file"
if [ -f "$file_path" ]; then
rm -f "$file_path"
fi
continue
fi
# Check if the file already exists
file_path="${BASE_DIR}/$file"
if [ -f "$file_path" ]; then