From a99751eb724d71135ec24969d7b782dfa27638ab Mon Sep 17 00:00:00 2001 From: Joel Biddle Date: Fri, 25 Aug 2023 12:36:53 +1000 Subject: [PATCH] Moved pwd checks into a subfolder --- frontend/src/components/signup/UserInfoStep.tsx | 2 +- .../components/utilities/checks/{ => password}/PasswordCheck.ts | 0 .../utilities/checks/{ => password}/checkIsPasswordBreached.ts | 0 .../components/utilities/checks/{ => password}/checkPassword.ts | 0 .../utilities/checks/{ => password}/passwordRegexes.ts | 0 frontend/src/pages/password-reset.tsx | 2 +- frontend/src/pages/signupinvite.tsx | 2 +- .../ChangePasswordSection/ChangePasswordSection.tsx | 2 +- .../views/Signup/components/UserInfoSSOStep/UserInfoSSOStep.tsx | 2 +- 9 files changed, 5 insertions(+), 5 deletions(-) rename frontend/src/components/utilities/checks/{ => password}/PasswordCheck.ts (100%) rename frontend/src/components/utilities/checks/{ => password}/checkIsPasswordBreached.ts (100%) rename frontend/src/components/utilities/checks/{ => password}/checkPassword.ts (100%) rename frontend/src/components/utilities/checks/{ => password}/passwordRegexes.ts (100%) diff --git a/frontend/src/components/signup/UserInfoStep.tsx b/frontend/src/components/signup/UserInfoStep.tsx index 430d373bd..0e2b02f87 100644 --- a/frontend/src/components/signup/UserInfoStep.tsx +++ b/frontend/src/components/signup/UserInfoStep.tsx @@ -13,7 +13,7 @@ import { fetchOrganizations } from "@app/hooks/api/organization/queries"; import ProjectService from "@app/services/ProjectService"; import InputField from "../basic/InputField"; -import checkPassword from "../utilities/checks/checkPassword"; +import checkPassword from "../utilities/checks/password/checkPassword"; import Aes256Gcm from "../utilities/cryptography/aes-256-gcm"; import { deriveArgonKey } from "../utilities/cryptography/crypto"; import { saveTokenToLocalStorage } from "../utilities/saveTokenToLocalStorage"; diff --git a/frontend/src/components/utilities/checks/PasswordCheck.ts b/frontend/src/components/utilities/checks/password/PasswordCheck.ts similarity index 100% rename from frontend/src/components/utilities/checks/PasswordCheck.ts rename to frontend/src/components/utilities/checks/password/PasswordCheck.ts diff --git a/frontend/src/components/utilities/checks/checkIsPasswordBreached.ts b/frontend/src/components/utilities/checks/password/checkIsPasswordBreached.ts similarity index 100% rename from frontend/src/components/utilities/checks/checkIsPasswordBreached.ts rename to frontend/src/components/utilities/checks/password/checkIsPasswordBreached.ts diff --git a/frontend/src/components/utilities/checks/checkPassword.ts b/frontend/src/components/utilities/checks/password/checkPassword.ts similarity index 100% rename from frontend/src/components/utilities/checks/checkPassword.ts rename to frontend/src/components/utilities/checks/password/checkPassword.ts diff --git a/frontend/src/components/utilities/checks/passwordRegexes.ts b/frontend/src/components/utilities/checks/password/passwordRegexes.ts similarity index 100% rename from frontend/src/components/utilities/checks/passwordRegexes.ts rename to frontend/src/components/utilities/checks/password/passwordRegexes.ts diff --git a/frontend/src/pages/password-reset.tsx b/frontend/src/pages/password-reset.tsx index fa83dbdd8..6d9becb08 100644 --- a/frontend/src/pages/password-reset.tsx +++ b/frontend/src/pages/password-reset.tsx @@ -10,7 +10,7 @@ import queryString from "query-string"; import Button from "@app/components/basic/buttons/Button"; import InputField from "@app/components/basic/InputField"; -import passwordCheck from "@app/components/utilities/checks/PasswordCheck"; +import passwordCheck from "~/components/utilities/checks/password/PasswordCheck"; import Aes256Gcm from "@app/components/utilities/cryptography/aes-256-gcm"; import { useResetPassword, useVerifyPasswordResetCode } from "@app/hooks/api"; import { getBackupEncryptedPrivateKey } from "@app/hooks/api/auth/queries"; diff --git a/frontend/src/pages/signupinvite.tsx b/frontend/src/pages/signupinvite.tsx index c7b04184e..20a093b9c 100644 --- a/frontend/src/pages/signupinvite.tsx +++ b/frontend/src/pages/signupinvite.tsx @@ -16,7 +16,7 @@ import { encodeBase64 } from "tweetnacl-util"; import Button from "@app/components/basic/buttons/Button"; import InputField from "@app/components/basic/InputField"; -import checkPassword from "@app/components/utilities/checks/checkPassword"; +import checkPassword from "~/components/utilities/checks/password/checkPassword"; import Aes256Gcm from "@app/components/utilities/cryptography/aes-256-gcm"; import { deriveArgonKey } from "@app/components/utilities/cryptography/crypto"; import issueBackupKey from "@app/components/utilities/cryptography/issueBackupKey"; diff --git a/frontend/src/views/Settings/PersonalSettingsPage/ChangePasswordSection/ChangePasswordSection.tsx b/frontend/src/views/Settings/PersonalSettingsPage/ChangePasswordSection/ChangePasswordSection.tsx index de83f0c0f..6a141d652 100644 --- a/frontend/src/views/Settings/PersonalSettingsPage/ChangePasswordSection/ChangePasswordSection.tsx +++ b/frontend/src/views/Settings/PersonalSettingsPage/ChangePasswordSection/ChangePasswordSection.tsx @@ -8,7 +8,7 @@ import * as yup from "yup"; import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider"; import attemptChangePassword from "@app/components/utilities/attemptChangePassword"; -import checkPassword from "@app/components/utilities/checks/checkPassword"; +import checkPassword from "~/components/utilities/checks/password/checkPassword"; import { Button, FormControl, Input } from "@app/components/v2"; import { useUser } from "@app/context"; diff --git a/frontend/src/views/Signup/components/UserInfoSSOStep/UserInfoSSOStep.tsx b/frontend/src/views/Signup/components/UserInfoSSOStep/UserInfoSSOStep.tsx index 79c502583..cc23933e9 100644 --- a/frontend/src/views/Signup/components/UserInfoSSOStep/UserInfoSSOStep.tsx +++ b/frontend/src/views/Signup/components/UserInfoSSOStep/UserInfoSSOStep.tsx @@ -9,7 +9,7 @@ import nacl from "tweetnacl"; import { encodeBase64 } from "tweetnacl-util"; import InputField from "@app/components/basic/InputField"; -import checkPassword from "@app/components/utilities/checks/checkPassword"; +import checkPassword from "~/components/utilities/checks/password/checkPassword"; import Aes256Gcm from "@app/components/utilities/cryptography/aes-256-gcm"; import { deriveArgonKey } from "@app/components/utilities/cryptography/crypto"; import { saveTokenToLocalStorage } from "@app/components/utilities/saveTokenToLocalStorage";