OIDC: a sign-in with an unverified email pre-creates an account a later verified sign-in links to #83
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in the v1.6.1 audit (below high; older than v1.6.0).
In
lib/rm_analyzer/accounts.ex,user_for_new_identity/2: when no user has the claim's email, thenilbranch creates a confirmed user (confirmed_at: now) for that address without checkingemail_verified. The existing-user branch does requireemail_verified == true, so a later verified sign-in (differentsub) with the same email is linked to the user the unverified sign-in created. Whoever made that first sign-in then shares the account.Only matters on a multi-user install whose IdP lets people sign in with an email they haven't verified.
Fix constraints:
email_verifiedmust keep working.