mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed security bugfix #4941 , process auth failed
This commit is contained in:
@@ -56,12 +56,14 @@ public class ClientAuthenticationHandler extends SimpleChannelHandler {
|
||||
byte[] errorBytes = NettyUtils.errorPacket(400,
|
||||
MessageFormatter.format("auth failed for seed is null", clientAuth.getUsername()).getMessage());
|
||||
NettyUtils.write(ctx.getChannel(), errorBytes, null);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!embeddedServer.auth(clientAuth.getUsername(), clientAuth.getPassword().toStringUtf8(), seed)) {
|
||||
byte[] errorBytes = NettyUtils.errorPacket(400,
|
||||
MessageFormatter.format("auth failed for user:{}", clientAuth.getUsername()).getMessage());
|
||||
NettyUtils.write(ctx.getChannel(), errorBytes, null);
|
||||
break;
|
||||
}
|
||||
|
||||
// 如果存在订阅信息
|
||||
|
||||
Reference in New Issue
Block a user