[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: removing password regex
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: removing password regex |
Date: |
Fri, 10 Mar 2023 16:13:36 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 7f7d1a769 removing password regex
7f7d1a769 is described below
commit 7f7d1a769f7da0da07256bfaf55314449554730a
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Fri Mar 10 12:13:20 2023 -0300
removing password regex
---
packages/demobank-ui/src/pages/LoginForm.tsx | 11 +++--------
packages/demobank-ui/src/pages/RegistrationPage.tsx | 7 +------
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/packages/demobank-ui/src/pages/LoginForm.tsx
b/packages/demobank-ui/src/pages/LoginForm.tsx
index 3d4279f99..2452745a5 100644
--- a/packages/demobank-ui/src/pages/LoginForm.tsx
+++ b/packages/demobank-ui/src/pages/LoginForm.tsx
@@ -20,7 +20,7 @@ import { useEffect, useRef, useState } from "preact/hooks";
import { useBackendContext } from "../context/backend.js";
import { bankUiSettings } from "../settings.js";
import { undefinedIfEmpty } from "../utils.js";
-import { PASSWORD_REGEX, USERNAME_REGEX } from "./RegistrationPage.js";
+import { USERNAME_REGEX } from "./RegistrationPage.js";
import { ShowInputErrorLabel } from "./ShowInputErrorLabel.js";
/**
@@ -32,7 +32,7 @@ export function LoginForm({ onRegister }: { onRegister: () =>
void }): VNode {
const [password, setPassword] = useState<string | undefined>();
const { i18n } = useTranslationContext();
const ref = useRef<HTMLInputElement>(null);
- useEffect(() => {
+ useEffect(function focusInput() {
ref.current?.focus();
}, []);
@@ -42,17 +42,12 @@ export function LoginForm({ onRegister }: { onRegister: ()
=> void }): VNode {
: !USERNAME_REGEX.test(username)
? i18n.str`Use letters and numbers only, and start with a lowercase
letter`
: undefined,
- password: !password
- ? i18n.str`Missing password`
- : !PASSWORD_REGEX.test(password)
- ? i18n.str`Use letters and numbers only, and start with a lowercase
letter or number`
- : undefined,
+ password: !password ? i18n.str`Missing password` : undefined,
});
return (
<Fragment>
<h1 class="nav">{i18n.str`Welcome to ${bankUiSettings.bankName}!`}</h1>
-
<div class="login-div">
<form
class="login-form"
diff --git a/packages/demobank-ui/src/pages/RegistrationPage.tsx
b/packages/demobank-ui/src/pages/RegistrationPage.tsx
index f22475e10..8554b1def 100644
--- a/packages/demobank-ui/src/pages/RegistrationPage.tsx
+++ b/packages/demobank-ui/src/pages/RegistrationPage.tsx
@@ -46,7 +46,6 @@ export function RegistrationPage({
}
export const USERNAME_REGEX = /^[a-z][a-zA-Z0-9]*$/;
-export const PASSWORD_REGEX = /^[a-z0-9][a-zA-Z0-9]*$/;
/**
* Collect and submit registration data.
@@ -72,11 +71,7 @@ function RegistrationForm({
: !USERNAME_REGEX.test(username)
? i18n.str`Use letters and numbers only, and start with a lowercase
letter`
: undefined,
- password: !password
- ? i18n.str`Missing password`
- : !PASSWORD_REGEX.test(password)
- ? i18n.str`Use letters and numbers only, and start with a lowercase
letter or number`
- : undefined,
+ password: !password ? i18n.str`Missing password` : undefined,
repeatPassword: !repeatPassword
? i18n.str`Missing password`
: repeatPassword !== password
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: removing password regex,
gnunet <=