Browse Source

Fixed bug in API key comparison

qdn
CalDescent 3 years ago
parent
commit
276a110e90
  1. 2
      src/main/java/org/qortal/api/Security.java

2
src/main/java/org/qortal/api/Security.java

@ -41,7 +41,7 @@ public abstract class Security {
} }
// The API keys must match // The API keys must match
if (!apiKey.equals(passedApiKey)) { if (!apiKey.toString().equals(passedApiKey)) {
throw ApiExceptionFactory.INSTANCE.createCustomException(request, ApiError.UNAUTHORIZED, "API key invalid"); throw ApiExceptionFactory.INSTANCE.createCustomException(request, ApiError.UNAUTHORIZED, "API key invalid");
} }
} }

Loading…
Cancel
Save