mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-26 16:16:10 +01:00
Remove exception log for api token errors
Printing the exception may reveal details about the password.
This commit is contained in:
2
gradle/changelog/remove_api_token_error_log.yaml
Normal file
2
gradle/changelog/remove_api_token_error_log.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
- type: fixed
|
||||||
|
description: Removed the API token error log message that was being printed when the API token was invalid.
|
||||||
@@ -64,9 +64,7 @@ class ApiKeyTokenHandler {
|
|||||||
return of(OBJECT_MAPPER.readValue(decoder.decode(token), Token.class));
|
return of(OBJECT_MAPPER.readValue(decoder.decode(token), Token.class));
|
||||||
} catch (IOException | DecodingException e) {
|
} catch (IOException | DecodingException e) {
|
||||||
LOG.debug("failed to read api token, perhaps it is a jwt token or a normal password");
|
LOG.debug("failed to read api token, perhaps it is a jwt token or a normal password");
|
||||||
if (LOG.isTraceEnabled()) {
|
// do not print the exception here, because it could reveal password details
|
||||||
LOG.trace("failed to parse token", e);
|
|
||||||
}
|
|
||||||
return empty();
|
return empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user