From 41e11dad5d5c733670b95fc53fa9241a8b84a1e3 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 5 Oct 2017 15:47:07 +0100 Subject: [PATCH] Respond with 401 for incorrect token --- src/github.com/matrix-org/dendrite/clientapi/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/auth/auth.go b/src/github.com/matrix-org/dendrite/clientapi/auth/auth.go index 833cf5446..b0bbe2bbb 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/auth/auth.go +++ b/src/github.com/matrix-org/dendrite/clientapi/auth/auth.go @@ -62,7 +62,7 @@ func VerifyAccessToken(req *http.Request, deviceDB DeviceDatabase) (device *auth if err != nil { if err == sql.ErrNoRows { resErr = &util.JSONResponse{ - Code: 403, + Code: 401, JSON: jsonerror.Forbidden("Invalid access token"), } } else {