mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-23 04:01:38 +00: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:
parent
2ccf9f3a32
commit
f12ffb660d
@ -309,7 +309,7 @@ func validateApplicationService(
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if matchedApplicationService != nil {
|
if matchedApplicationService == nil {
|
||||||
return "", &util.JSONResponse{
|
return "", &util.JSONResponse{
|
||||||
Code: 401,
|
Code: 401,
|
||||||
JSON: jsonerror.UnknownToken("Supplied access_token does not match any known application service"),
|
JSON: jsonerror.UnknownToken("Supplied access_token does not match any known application service"),
|
||||||
|
Loading…
Reference in New Issue
Block a user