mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
fix(site): changing password no longer silently trims space chars in a password (#5640)
This commit is contained in:
@ -2,7 +2,7 @@ import TextField from "@material-ui/core/TextField"
|
|||||||
import { FormikContextType, FormikTouched, useFormik } from "formik"
|
import { FormikContextType, FormikTouched, useFormik } from "formik"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import * as Yup from "yup"
|
import * as Yup from "yup"
|
||||||
import { getFormHelpers, onChangeTrimmed } from "../../util/formUtils"
|
import { getFormHelpers } from "../../util/formUtils"
|
||||||
import { LoadingButton } from "../LoadingButton/LoadingButton"
|
import { LoadingButton } from "../LoadingButton/LoadingButton"
|
||||||
import { Stack } from "../Stack/Stack"
|
import { Stack } from "../Stack/Stack"
|
||||||
import { AlertBanner } from "components/AlertBanner/AlertBanner"
|
import { AlertBanner } from "components/AlertBanner/AlertBanner"
|
||||||
@ -77,7 +77,6 @@ export const SecurityForm: React.FC<SecurityFormProps> = ({
|
|||||||
)}
|
)}
|
||||||
<TextField
|
<TextField
|
||||||
{...getFieldHelpers("old_password")}
|
{...getFieldHelpers("old_password")}
|
||||||
onChange={onChangeTrimmed(form)}
|
|
||||||
autoComplete="old_password"
|
autoComplete="old_password"
|
||||||
fullWidth
|
fullWidth
|
||||||
label={Language.oldPasswordLabel}
|
label={Language.oldPasswordLabel}
|
||||||
@ -86,7 +85,6 @@ export const SecurityForm: React.FC<SecurityFormProps> = ({
|
|||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
{...getFieldHelpers("password")}
|
{...getFieldHelpers("password")}
|
||||||
onChange={onChangeTrimmed(form)}
|
|
||||||
autoComplete="password"
|
autoComplete="password"
|
||||||
fullWidth
|
fullWidth
|
||||||
label={Language.newPasswordLabel}
|
label={Language.newPasswordLabel}
|
||||||
@ -95,7 +93,6 @@ export const SecurityForm: React.FC<SecurityFormProps> = ({
|
|||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
{...getFieldHelpers("confirm_password")}
|
{...getFieldHelpers("confirm_password")}
|
||||||
onChange={onChangeTrimmed(form)}
|
|
||||||
autoComplete="confirm_password"
|
autoComplete="confirm_password"
|
||||||
fullWidth
|
fullWidth
|
||||||
label={Language.confirmPasswordLabel}
|
label={Language.confirmPasswordLabel}
|
||||||
|
Reference in New Issue
Block a user