Increased Security

This commit is contained in:
NianBroken
2024-07-25 16:49:31 +08:00 Unverified
parent 0a8b883b2e
commit 43452cf65f
+1 -1
View File
@@ -118,7 +118,7 @@ jobs:
local length=${#input} # 计算输入字符串的长度并赋值给局部变量 length
# 如果字符串长度小于等于2,则将其全部替换为 '*'
if [ $length -le 2 ]; then
if [ $length -le 3 ]; then
echo $(printf '%*s' $length | tr ' ' '*') # 使用 printf 和 tr 命令生成与长度相同数量的 '*'
else
local first=${input:0:1} # 提取字符串的第一个字符并赋值给局部变量 first