Skip to content

Commit

Permalink
Merge pull request #191 from ministryofjustice/case-bug
Browse files Browse the repository at this point in the history
Make email checks case insensitive
  • Loading branch information
levgorbunov1 authored May 22, 2024
2 parents 7279302 + 4755ccc commit 929f5ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/main/routes/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ def invitation_sent():
@requires_auth
@join_route.route("/send-invitation")
def send_invitation():
auth0_email = session["user"]["userinfo"]["email"]
user_input_email = session["user_input_email"]
auth0_email = session["user"]["userinfo"]["email"].lower()
user_input_email = session["user_input_email"].lower()
org_selection = sanitise_org_selection(session["org_selection"])

if user_input_email.lower() != auth0_email.lower():
if user_input_email != auth0_email:
logger.error("Initial email does not match authenticated email")
abort(400, f"Initial email {user_input_email} does not match authenticated email {auth0_email}")

Expand Down

0 comments on commit 929f5ea

Please sign in to comment.