mirror of https://github.com/jumpserver/jumpserver
perf: random password exclude some char
parent
3af188492f
commit
44d77ba03f
|
@ -21,7 +21,7 @@ class PasswordStrategy(models.TextChoices):
|
||||||
random_all = 'random_all', _('All assets use different random password')
|
random_all = 'random_all', _('All assets use different random password')
|
||||||
|
|
||||||
|
|
||||||
string_punctuation = '!#$%&()*+,-.:;<=>?@[]^_~'
|
string_punctuation = '!#$%&()*+,-.:;<=?@[]_~'
|
||||||
DEFAULT_PASSWORD_LENGTH = 30
|
DEFAULT_PASSWORD_LENGTH = 30
|
||||||
DEFAULT_PASSWORD_RULES = {
|
DEFAULT_PASSWORD_RULES = {
|
||||||
'length': DEFAULT_PASSWORD_LENGTH,
|
'length': DEFAULT_PASSWORD_LENGTH,
|
||||||
|
|
|
@ -14,8 +14,16 @@ if [[ $1 == "root" ]];then
|
||||||
BASE_DIR="${BASE_DIR}/jumpserver"
|
BASE_DIR="${BASE_DIR}/jumpserver"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for file in $to_files; do
|
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
|
# Check if the file already exists
|
||||||
file_path="${BASE_DIR}/$file"
|
file_path="${BASE_DIR}/$file"
|
||||||
if [ -f "$file_path" ]; then
|
if [ -f "$file_path" ]; then
|
||||||
|
|
Loading…
Reference in New Issue