mirror of
https://github.com/simple-login/app.git
synced 2024-11-11 01:42:54 +08:00
Handle the case where a deleted mailbox verification link is clicked
This commit is contained in:
parent
103418dff7
commit
e9d03d1d4b
1 changed files with 4 additions and 0 deletions
|
@ -150,6 +150,10 @@ def mailbox_verify():
|
||||||
return redirect(url_for("dashboard.mailbox_route"))
|
return redirect(url_for("dashboard.mailbox_route"))
|
||||||
else:
|
else:
|
||||||
mailbox = Mailbox.get(r_id)
|
mailbox = Mailbox.get(r_id)
|
||||||
|
if not mailbox:
|
||||||
|
flash("Invalid link", "error")
|
||||||
|
return redirect(url_for("dashboard.mailbox_route"))
|
||||||
|
|
||||||
mailbox.verified = True
|
mailbox.verified = True
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue