AdamBien/gatelink

Base64 has weakness

akondasif opened this issue · 0 comments

Greetings,

We are researchers and we are looking for insecure coding patterns and configurations in the microservice architecture repositories. In your repository, we have found instances of BASE64 usage. CWE says "A programmer can attempt to remedy the password management problem by obscuring the password with an encoding function, such as base 64 encoding, but this effort does not adequately protect the password."

Hopefully, you agree and will fix it.

Source:

byte[] decoded = Base64.getDecoder().decode(first);

and
return Base64.getUrlEncoder().encodeToString(encoded);

and
byte[] decodedPrivateKey = Base64.getUrlDecoder().decode(encodedPrivateKey);

and
return Base64.getUrlEncoder().withoutPadding().encodeToString(getPrivateKeyAsBytes());