fix: Fix change password and password validation
1. Show detailed error messages when changing password with previous password 2. Fix user password validation to get better extensions Change-Id: I5f323f2f622e2a8bdf81a8dc00bc3e674b4c0953
This commit is contained in:
parent
e25560d3a6
commit
e31e47fa32
@ -0,0 +1,8 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fix change password and password validation
|
||||
|
||||
1. Show detailed error messages when changing password with previous password
|
||||
|
||||
2. Fix user password validation to get better extensions (max length increased from 16 to 32, additional characters > < )
|
@ -27,8 +27,8 @@
|
||||
"4 2 123456789abcdef67890123456789abcdef67890123456789abcdef123456789 <ul> <li><b>4 is Algorithm:</b> Algorithm (0: reserved; 1: RSA; 2: DSA, 3: ECDSA; 4: Ed25519; 6:Ed448)</li> <li><b>2 is Type:</b> Algorithm used to hash the public key (0: reserved; 1: SHA-1; 2: SHA-256)</li> <li><b>Last parameter is Fingerprint:</b> Hexadecimal representation of the hash result, as text</li> </ul>": "4 2 123456789abcdef67890123456789abcdef67890123456789abcdef123456789 <ul> <li><b>4 is Algorithm:</b> Algorithm (0: reserved; 1: RSA; 2: DSA, 3: ECDSA; 4: Ed25519; 6:Ed448)</li> <li><b>2 is Type:</b> Algorithm used to hash the public key (0: reserved; 1: SHA-1; 2: SHA-256)</li> <li><b>Last parameter is Fingerprint:</b> Hexadecimal representation of the hash result, as text</li> </ul>",
|
||||
"4. When you use a port range to create {resources}, multiple {resources} will be created in batches. ": "4. When you use a port range to create {resources}, multiple {resources} will be created in batches. ",
|
||||
"5min": "5min",
|
||||
"8 to 16 characters, at least one uppercase letter, one lowercase letter, one number and one special character.": "8 to 16 characters, at least one uppercase letter, one lowercase letter, one number and one special character.",
|
||||
"8 to 16 characters, at least one uppercase letter, one lowercase letter, one number.": "8 to 16 characters, at least one uppercase letter, one lowercase letter, one number.",
|
||||
"8 to 32 characters, at least one uppercase letter, one lowercase letter, one number and one special character.": "8 to 32 characters, at least one uppercase letter, one lowercase letter, one number and one special character.",
|
||||
"A command that will be sent to the container": "A command that will be sent to the container",
|
||||
"A container with the same name already exists": "A container with the same name already exists",
|
||||
"A dynamic scheduling algorithm that estimates the server load based on the number of currently active connections. The system allocates new connection requests to the server with the least number of current connections. Commonly used for long connection services, such as database connections and other services.": "A dynamic scheduling algorithm that estimates the server load based on the number of currently active connections. The system allocates new connection requests to the server with the least number of current connections. Commonly used for long connection services, such as database connections and other services.",
|
||||
|
@ -27,8 +27,8 @@
|
||||
"4 2 123456789abcdef67890123456789abcdef67890123456789abcdef123456789 <ul> <li><b>4 is Algorithm:</b> Algorithm (0: reserved; 1: RSA; 2: DSA, 3: ECDSA; 4: Ed25519; 6:Ed448)</li> <li><b>2 is Type:</b> Algorithm used to hash the public key (0: reserved; 1: SHA-1; 2: SHA-256)</li> <li><b>Last parameter is Fingerprint:</b> Hexadecimal representation of the hash result, as text</li> </ul>": "",
|
||||
"4. When you use a port range to create {resources}, multiple {resources} will be created in batches. ": " {resources} 생성을 위해 포트 범위를 사용하면 배치로 다수의 {resources}가 생성됩니다.",
|
||||
"5min": "5분",
|
||||
"8 to 16 characters, at least one uppercase letter, one lowercase letter, one number and one special character.": "8 ~ 16 문자, 최소 대문자 한개, 소문자 한개, 숫자 한개, 특수 문자 한개",
|
||||
"8 to 16 characters, at least one uppercase letter, one lowercase letter, one number.": "8 ~ 16 문자, 최소 대문자 한개, 소문자 한개, 숫자 한개, 특수 문자 한개",
|
||||
"8 to 32 characters, at least one uppercase letter, one lowercase letter, one number and one special character.": "8 ~ 32 문자, 최소 대문자 한개, 소문자 한개, 숫자 한개, 특수 문자 한개",
|
||||
"A command that will be sent to the container": "컨테이너로 전송될 명령어",
|
||||
"A container with the same name already exists": "동일한 이름의 컨테이너가 존재합니다.",
|
||||
"A dynamic scheduling algorithm that estimates the server load based on the number of currently active connections. The system allocates new connection requests to the server with the least number of current connections. Commonly used for long connection services, such as database connections and other services.": "동적 스케쥴링 알고리즘은 현재 연결된 커넥션 수로 서버 로드를 예측합니다. 시스템은 최소 연결을 가진 서버로 새로운 연결을 할당합니다. 데이터베이스 연결 및 다른 서비스 처럼 오래 지속되는 연결을 갖는 서비스에 활용됩니다.",
|
||||
|
@ -27,8 +27,8 @@
|
||||
"4 2 123456789abcdef67890123456789abcdef67890123456789abcdef123456789 <ul> <li><b>4 is Algorithm:</b> Algorithm (0: reserved; 1: RSA; 2: DSA, 3: ECDSA; 4: Ed25519; 6:Ed448)</li> <li><b>2 is Type:</b> Algorithm used to hash the public key (0: reserved; 1: SHA-1; 2: SHA-256)</li> <li><b>Last parameter is Fingerprint:</b> Hexadecimal representation of the hash result, as text</li> </ul>": "4 2 123456789abcdef67890123456789abcdef67890123456789abcdef123456789 <ul> <li><b>4 是算法:</b> 算法(0:保留;1:RSA;2:DSA;3:ECDSA;4:Ed25519;6:Ed第448章)</li> <li><b>2 是类型:</b>用于散列公钥的算法(0:保留;1:SHA-1;2:SHA-256)</li> <li><b>最后一个参数是指纹:</b>哈希结果的十六进制表示,作为文本</li></ul>",
|
||||
"4. When you use a port range to create {resources}, multiple {resources} will be created in batches. ": "4. 使用端口范围创建{resources}时,会批量创建多个{resources}。",
|
||||
"5min": "5分钟",
|
||||
"8 to 16 characters, at least one uppercase letter, one lowercase letter, one number and one special character.": "8个到16个字符,至少一个大写字母,一个小写字母,一个数字和一个特殊字符。",
|
||||
"8 to 16 characters, at least one uppercase letter, one lowercase letter, one number.": "8个到16个字符,至少一个大写字母,一个小写字母,一个数字。",
|
||||
"8 to 32 characters, at least one uppercase letter, one lowercase letter, one number and one special character.": "8个到32个字符,至少一个大写字母,一个小写字母,一个数字和一个特殊字符。",
|
||||
"A command that will be sent to the container": "将发送到容器的命令",
|
||||
"A container with the same name already exists": "已存在同名容器",
|
||||
"A dynamic scheduling algorithm that estimates the server load based on the number of currently active connections. The system allocates new connection requests to the server with the least number of current connections. Commonly used for long connection services, such as database connections and other services.": "通过当前活跃的连接数来估计服务器负载情况的一种动态调度算法,系统把新的连接请求分配给当前连接数目最少的服务器。常用于长连接服务,例如数据库连接等服务。",
|
||||
|
@ -86,9 +86,8 @@ export class Password extends Component {
|
||||
rootStore.routing.push('/auth/login');
|
||||
},
|
||||
(err) => {
|
||||
const {
|
||||
reason: { message },
|
||||
} = err;
|
||||
const { response: { data: { error: { message } = {} } = {} } = {} } =
|
||||
err;
|
||||
this.setState({
|
||||
error: true,
|
||||
message,
|
||||
|
@ -30,7 +30,7 @@ const portRangeRegex =
|
||||
const ipWithMask =
|
||||
/^(?:(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}(?:[0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\/([1-9]|[1-2]\d|3[0-2])$/;
|
||||
const passwordRegex =
|
||||
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\\[\]`~!@#$%^&*()_\-+=?:"{}|,.\\/;'])[A-Za-z\d\\[\]`~!@#$%^&*()_\-+=?:"{}|,.\\/;']{8,16}$/;
|
||||
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\\[\]`~!@#$%^&*><()_\-+=?:"{}|,.\\/;'])[A-Za-z\d\\[\]`~!@#$%^&*><()_\-+=?:"{}|,.\\/;']{8,32}$/;
|
||||
const instancePasswordRegex =
|
||||
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[A-Za-z\d\\[\]`~!@#$%^&*()_\-+=?:"{}|,.\\/;']{8,16}$/;
|
||||
const emailRegex =
|
||||
@ -636,7 +636,7 @@ export const passwordValidate = (rule, value, state) => {
|
||||
)
|
||||
: getErrorMessage(
|
||||
t(
|
||||
'8 to 16 characters, at least one uppercase letter, one lowercase letter, one number and one special character.'
|
||||
'8 to 32 characters, at least one uppercase letter, one lowercase letter, one number and one special character.'
|
||||
),
|
||||
hasPrefix
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user