mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-09 00:18:39 +03:00
known_hosts parsing does not ignore malformed base64 strings since 0.36.0 (#922)
This commit is contained in:
@@ -292,8 +292,8 @@ public class OpenSSHKnownHosts
|
||||
try {
|
||||
byte[] keyBytes = Base64.getDecoder().decode(sKey);
|
||||
key = new Buffer.PlainBuffer(keyBytes).readPublicKey();
|
||||
} catch (IOException ioe) {
|
||||
log.warn("Error decoding Base64 key bytes", ioe);
|
||||
} catch (IOException | IllegalArgumentException exception) {
|
||||
log.warn("Error decoding Base64 key bytes", exception);
|
||||
return new BadHostEntry(line);
|
||||
}
|
||||
} else if (isBits(sType)) {
|
||||
|
||||
Reference in New Issue
Block a user