错误报告
2023-02-16T08:11:47+00:00 [QUERY] mqttx_96c70fbd@172.18.88.1:61461 msg: redis_connector_received, connector: emqx_authz_redis:43, sql: HGETALLmqtt_acl:17328702195, state: [auto_reconnect: true, poolname: emqx_authz_redis:43:403, type: single]
2023-02-16T16:09:52.945362+00:00 [warning] authorize_type: redis, clientid: mqttx_96c70fbd, exception: error, line: 402, mfa: emqx_authz:do_authorize/4, msg: unexpected_error_in_authorize, peername: 172.18.88.1:61461, reason: function_clause, stacktrace: [{emqx_authz_rule,compile,[{allow,all,<<“Publish”>>,[<<“vanhitech/down/scene/32C42EAB874D”>>]}],[{file,“emqx_authz_rule.erl”},{line,61}]},{emqx_authz_redis,do_authorize,4,[{file,“emqx_authz_redis.erl”},{line,104}]},{emqx_authz,do_authorize,4,[{file,“emqx_authz.erl”},{line,387}]},{emqx_authz,authorize_non_superuser,5,[{file,“emqx_authz.erl”},{line,338}]},{emqx_hooks,safe_execute,2,[{file,“emqx_hooks.erl”},{line,200}]},{emqx_hooks,do_run_fold,3,[{file,“emqx_hooks.erl”},{line,180}]},{emqx_access_control,do_authorize,3,[{file,“emqx_access_control.erl”},{line,128}]},{emqx_access_control,check_authorization_cache,3,[{file,“emqx_access_control.erl”},{line,89}]},{emqx_access_control,authorize,3,[{file,“emqx_access_control.erl”},{line,80}]},{emqx_channel,check_pub_authz,2,[{file,“emqx_channel.erl”},{line,1851}]},{emqx_misc,pipeline,3,[{file,“emqx_misc.erl”},{line,159}]},{emqx_channel,process_publish,2,[{file,“emqx_channel.erl”},{line,641}]},{emqx_connection,with_channel,3,[{file,“emqx_connection.erl”},{line,790}]},{emqx_connection,process_msg,2,[{file,“emqx_connection.erl”},{line,466}]},{emqx_connection,process_msg,2,[{file,“emqx_connection.erl”},{line,472}]},{emqx_connection,handle_recv,3,[{file,“emqx_connection.erl”},{line,428}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,236}]}]
环境
- EMQX 版本:5.0
- 操作系统版本:win10
预期行为
我只给了主题:vanhitech/down/online/32C42EAB874D授予subscribe权限,它应该不能发布消息
实际行为
实际是主题:vanhitech/down/online/32C42EAB874D把消息发布了
2023-02-16T08:11:47+00:00 [PUBLISH] mqttx_96c70fbd@172.18.88.1:61461 msg: publish_to, topic: vanhitech/down/online/32C42EAB874D, payload: {
“clientToken”:“clientToken-1670323948669”,
“method”:“report_add”
}
2023-02-16T08:11:47+00:00 [MQTT] mqttx_96c70fbd@172.18.88.1:61461 msg: mqtt_packet_sent, packet: PUBLISH(Q0, R0, D0),Topic=vanhitech/down/online/32C42EAB874D, PacketId=undefinedPayload={
“clientToken”:“clientToken-1670323948669”,
“method”:“report_add”
}