-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change pwd check to O(1) check to prevent timing attacks - single use…
…r mode (#575) Change pwd check to O(1) check to prevent timing attacks
- Loading branch information
1 parent
a4ace56
commit 3c859ba
Showing
4 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import React from "react"; | ||
import PasswordModal, { usePasswordModal } from "@/components/Modals/Password"; | ||
import { FullScreenLoader } from "@/components/Preloader"; | ||
import { Navigate } from "react-router-dom"; | ||
import paths from "@/utils/paths"; | ||
|
||
export default function Login() { | ||
const { loading, mode } = usePasswordModal(); | ||
const { loading, requiresAuth, mode } = usePasswordModal(); | ||
if (loading) return <FullScreenLoader />; | ||
if (requiresAuth === false) return <Navigate to={paths.home()} />; | ||
|
||
return <PasswordModal mode={mode} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters