Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove trailing slash ability from password reset's submit_token endp…
Browse files Browse the repository at this point in the history
…oint (#6074)

Remove trailing slash ability from the password reset submit_token endpoint. Since we provide the link in an email, and have never sent it with a trailing slash, there's no point for us to accept them on the endpoint.
  • Loading branch information
anoadragon453 authored Sep 20, 2019
1 parent aeb40f3 commit 7763dd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/6074.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent password reset's submit_token endpoint from accepting trailing slashes.
2 changes: 1 addition & 1 deletion synapse/rest/client/v2_alpha/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class PasswordResetSubmitTokenServlet(RestServlet):
"""Handles 3PID validation token submission"""

PATTERNS = client_patterns(
"/password_reset/(?P<medium>[^/]*)/submit_token/*$", releases=(), unstable=True
"/password_reset/(?P<medium>[^/]*)/submit_token$", releases=(), unstable=True
)

def __init__(self, hs):
Expand Down

0 comments on commit 7763dd3

Please sign in to comment.