Correct if statement logic

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 (https://amorgan.xyz) 2018-03-07 00:59:31 -08:00
parent 6b55972183
commit 3c250a4f91
No known key found for this signature in database
GPG key ID: 174BEAB009FD176D

View file

@ -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"),