Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Comment

Manav Rathi3ae1b18bf1e3
diff --git a/web/packages/accounts/pages/credentials.tsx b/web/packages/accounts/pages/credentials.tsx
index f55c2290a4..60a2611e7e 100644
--- a/web/packages/accounts/pages/credentials.tsx
+++ b/web/packages/accounts/pages/credentials.tsx
@@ -199,6 +199,11 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
const getKeyAttributes: VerifyMasterPasswordFormProps["getKeyAttributes"] =
async (kek: string) => {
try {
+ // Currently the page will get reloaded if any of the attributes
+ // have changed, so we don't need to worry about the kek having
+ // been generated using stale credentials. This await on the
+ // promise is here to only ensure we're done with the check
+ // before we let the user in.
if (sessionValidityCheck) await sessionValidityCheck;
const cryptoWorker = await ComlinkCryptoWorker.getInstance();