Skip to content

Commit 7e6521e

Browse files
Actually failing auth when usernames are mismatched (#537)
1 parent f0304db commit 7e6521e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/sip/inbound.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,8 @@ func (s *Server) handleInviteAuth(tid traceid.ID, log logger.Logger, req *sip.Re
221221
"expectedUsername", username,
222222
"receivedUsername", cred.Username,
223223
)
224-
// Commenting for now. Will check the number of occurences in production before
225-
// uncommenting this.
226-
// _ = tx.Respond(sip.NewResponseFromRequest(req, 401, "Unauthorized", nil))
227-
// return false
224+
_ = tx.Respond(sip.NewResponseFromRequest(req, 401, "Unauthorized", nil))
225+
return false
228226
}
229227

230228
// Check if we have a valid challenge state

0 commit comments

Comments
 (0)