You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
recoverEmail handler passes action code into the wrong parameter #8299
Looks like the recoverEmail path in email-handler.html is passing the action code into the wrong parameter.
handleRecoverEmail is defined as:
functionhandleRecoverEmail(auth,actionCode,lang){
But the switch calls it like this:
handleRecoverEmail(actionCode);
Inside the handler, checkActionCode(Auth, actionCode) and applyActionCode(Auth, actionCode) use the second parameter, so actionCode ends up being undefined for recover email links.
How to reproduce:
Open an email recovery link that uses /email-handler?mode=recoverEmail&oobCode=<valid code>.
The handler enters the recoverEmail branch.
handleRecoverEmail receives only one argument.
Firebase receives undefined as the action code, so the email recovery flow fails instead of reverting the email.
Impact is limited, but this does affect account recovery. If a user's email was changed accidentally or maliciously, the recovery link may not work through Monkeytype's handler. I do not think this is account takeover by itself.
A fix would be to either call handleRecoverEmail(Auth, actionCode, lang) or simplify the function signature so the action code is the first argument.
The bug is in the firebase action handler, not a normal page opened from the app UI. Firebase uses mode=recoveremail for email change revocation links, and monkeytypes handler has a parameter mismatch for that mode. I havent verified the exact production email template/config, so if monkeytype no longer routes those links to this handler then it may just be dead/stale code.
Activity
fehmer commentedon Jul 29, 2026
Hi @Zoroo2626, how can I trigger that flow through the UI? Thanks!
Fv7eh commentedon Jul 29, 2026
The bug is in the firebase action handler, not a normal page opened from the app UI. Firebase uses mode=recoveremail for email change revocation links, and monkeytypes handler has a parameter mismatch for that mode. I havent verified the exact production email template/config, so if monkeytype no longer routes those links to this handler then it may just be dead/stale code.
(Apologies for the previous lack of clarity.)