We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegistryEndpointCaller.call():
RegistryEndpointCaller.call()
boolean isHttpProtocol = "http".equals(url.getProtocol()); ... if (!isHttpProtocol || Boolean.getBoolean("sendCredentialsOverHttp")) { requestBuilder.setAuthorization(authorization); } ... } else if (httpResponseException.getStatusCode() == HttpStatusCodes.STATUS_CODE_UNAUTHORIZED) { if (isHttpProtocol) { // Using HTTP, so credentials weren't sent. throw new RegistryCredentialsNotSentException(...); } else { // Using HTTPS, so credentials are missing. throw new RegistryUnauthorizedException(...); }
So the following check is problematic, because if sendCredentialsOverHttp is set, the credentials were sent.
sendCredentialsOverHttp
if (isHttpProtocol) { // Using HTTP, so credentials weren't sent.
The correct way is
boolean isHttpProtocol = "http".equals(url.getProtocol()); ... boolean sendCredentials = !isHttpProtocol || Boolean.getBoolean("sendCredentialsOverHttp"; if (sendCredentials) { requestBuilder.setAuthorization(authorization); } ... } else if (httpResponseException.getStatusCode() == HttpStatusCodes.STATUS_CODE_UNAUTHORIZED) { if (!sendCredentials) { // Did not send credentials. throw new RegistryCredentialsNotSentException(...); } else { // Credentials are either missing or wrong. throw new RegistryUnauthorizedException(...); }
The text was updated successfully, but these errors were encountered:
chanseokoh
No branches or pull requests
RegistryEndpointCaller.call()
:So the following check is problematic, because if
sendCredentialsOverHttp
is set, the credentials were sent.The correct way is
The text was updated successfully, but these errors were encountered: