From c594bbddb463e56d5e0108537172c40412e2835f Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 27 Jul 2018 18:11:10 +0100 Subject: [PATCH] Account for application service headers auth --- .../matrix-org/dendrite/clientapi/routing/register.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/register.go b/src/github.com/matrix-org/dendrite/clientapi/routing/register.go index d8a46c5e0..a86934496 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/register.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/register.go @@ -497,7 +497,8 @@ func Register( // Application services can register users with no auth type, but require // access token. Differentiate from users who are initially hitting register // without an auth type - if r.Auth.Type == "" && req.URL.Query().Get("access_token") == "" { + if r.Auth.Type == "" && req.URL.Query().Get("access_token") == "" && + req.Header.Get("Authorization") == "" { return util.JSONResponse{ Code: http.StatusUnauthorized, JSON: newUserInteractiveResponse(sessionID,