Compare commits

...
3 Commits
Author SHA1 Message Date
Maksim Eltyshev bb7cdf5dd4 chore: Update version 2022-09-02 17:05:48 +05:00
Maksim Eltyshev 253af55790 fix: Add password requirements when creating user
Closes #293
2022-09-02 17:04:51 +05:00
Maksim Eltyshev 62c3cca9a7 fix: Fix password length validation 2022-08-30 15:13:17 +02:00
5 changed files with 24 additions and 13 deletions
@@ -142,15 +142,20 @@ const UserAddStep = React.memo(
onChange={handleFieldChange}
/>
<div className={styles.text}>{t('common.password')}</div>
<Input.Password
fluid
ref={passwordField}
name="password"
value={data.password}
readOnly={isSubmitting}
className={styles.field}
onChange={handleFieldChange}
/>
<div className={styles.field}>
<Input.Password
fluid
ref={passwordField}
name="password"
value={data.password}
readOnly={isSubmitting}
className={styles.field}
onChange={handleFieldChange}
/>
<div className={styles.note}>
{t('common.mustBeAtLeast6CharactersLongAndContainAtLeastOneLetterAndNumber')}
</div>
</div>
<div className={styles.text}>{t('common.name')}</div>
<Input
fluid
@@ -3,6 +3,12 @@
margin-bottom: 8px;
}
.note {
font-size: 11px;
margin-top: 4px;
opacity: 0.5;
}
.text {
color: #444444;
font-size: 12px;
+1 -1
View File
@@ -2,7 +2,7 @@ const PASSWORD_REGEX = /^(?=.*[A-Za-z])(?=.*\d).+$/;
const USERNAME_REGEX = /^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$/;
export const isPassword = (string) => {
return string.length >= 3 && PASSWORD_REGEX.test(string);
return string.length >= 6 && PASSWORD_REGEX.test(string);
};
export const isUsername = (string) => {
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "planka",
"version": "1.7.4",
"version": "1.7.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "planka",
"version": "1.7.4",
"version": "1.7.5",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "planka",
"version": "1.7.4",
"version": "1.7.5",
"private": true,
"homepage": "https://plankanban.github.io/planka",
"repository": {