Skip to content

Commit efee03f

Browse files
authored
fix(site): changing password no longer silently trims space chars in a password (coder#5640)
1 parent 56a69b7 commit efee03f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

site/src/components/SettingsSecurityForm/SettingsSecurityForm.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import TextField from "@material-ui/core/TextField"
22
import { FormikContextType, FormikTouched, useFormik } from "formik"
33
import React from "react"
44
import * as Yup from "yup"
5-
import { getFormHelpers, onChangeTrimmed } from "../../util/formUtils"
5+
import { getFormHelpers } from "../../util/formUtils"
66
import { LoadingButton } from "../LoadingButton/LoadingButton"
77
import { Stack } from "../Stack/Stack"
88
import { AlertBanner } from "components/AlertBanner/AlertBanner"
@@ -77,7 +77,6 @@ export const SecurityForm: React.FC<SecurityFormProps> = ({
7777
)}
7878
<TextField
7979
{...getFieldHelpers("old_password")}
80-
onChange={onChangeTrimmed(form)}
8180
autoComplete="old_password"
8281
fullWidth
8382
label={Language.oldPasswordLabel}
@@ -86,7 +85,6 @@ export const SecurityForm: React.FC<SecurityFormProps> = ({
8685
/>
8786
<TextField
8887
{...getFieldHelpers("password")}
89-
onChange={onChangeTrimmed(form)}
9088
autoComplete="password"
9189
fullWidth
9290
label={Language.newPasswordLabel}
@@ -95,7 +93,6 @@ export const SecurityForm: React.FC<SecurityFormProps> = ({
9593
/>
9694
<TextField
9795
{...getFieldHelpers("confirm_password")}
98-
onChange={onChangeTrimmed(form)}
9996
autoComplete="confirm_password"
10097
fullWidth
10198
label={Language.confirmPasswordLabel}

0 commit comments

Comments
 (0)