0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-14 09:33:55 +01:00

Correct if statement logic (#415)

Should return error if we didn't find an Application Service, not the
other way around. Reported by @APWhitehat

Signed-off-by: Andrew Morgan (https://amorgan.xyz) <andrew@amorgan.xyz>
This commit is contained in:
Andrew Morgan 2018-03-13 08:35:56 -07:00 committed by Richard van der Hoff
parent 2ccf9f3a32
commit f12ffb660d

View file

@ -309,7 +309,7 @@ func validateApplicationService(
break
}
}
if matchedApplicationService != nil {
if matchedApplicationService == nil {
return "", &util.JSONResponse{
Code: 401,
JSON: jsonerror.UnknownToken("Supplied access_token does not match any known application service"),