feat: only allow address [a-z0-9] (#347)

This commit is contained in:
Dream Hunter
2024-07-13 19:03:54 +08:00
committed by GitHub
parent aa8f3b4d46
commit 26ccfdd6e0
4 changed files with 7 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ export const newAddress = async (
checkLengthByConfig: boolean = true
): Promise<{ address: string, jwt: string }> => {
// remove special characters
name = name.replace(/[^a-zA-Z0-9.]/g, '')
name = name.replace(/[^a-z0-9]/g, '')
// name min length min 1
const minAddressLength = Math.max(
checkLengthByConfig ? getIntValue(c.env.MIN_ADDRESS_LEN, 1) : 1,