mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
00_MQTT2_SERVER.pm: reject CONNECT with non-zero reserved bits (Forum #119585)
git-svn-id: https://svn.fhem.de/fhem/trunk@23987 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2614241835
commit
1841c3e1e1
@ -324,6 +324,10 @@ MQTT2_SERVER_Read($@)
|
||||
####################################
|
||||
if($cpt eq "CONNECT") {
|
||||
# V3:MQIsdb V4:MQTT
|
||||
if(ord($fb) & 0xf) { # lower nibble must be zero
|
||||
Log3 $sname, 3, "$cname with bogus CONNECT (".ord($fb)."), disconnecting";
|
||||
return CommandDelete(undef, $cname);
|
||||
}
|
||||
($hash->{protoTxt}, $off) = MQTT2_SERVER_getStr($hash, $pl, 0);
|
||||
$hash->{protoNum} = unpack('C*', substr($pl,$off++,1)); # 3 or 4
|
||||
$hash->{cflags} = unpack('C*', substr($pl,$off++,1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user