Well2333 / nonebot-plugin-bilichat

一个通过 OpenAI 来对b站视频进行总结的多功能 B站解析插件
GNU Affero General Public License v3.0
223 stars 10 forks source link

[bug反馈]插件黑白名单没有校验user_id,channel_id #76

Closed Cypas closed 1 year ago

Cypas commented 1 year ago

https://github.com/Aunly/nonebot-plugin-bilichat/blob/09bd3007d96fb6629633fa2bebf5c36c00a9e31b/nonebot_plugin_bilichat/__init__.py#L113-L115

这里直接返回的是配置项的是否允许私聊,并没有对user_id进行校验

https://github.com/Aunly/nonebot-plugin-bilichat/blob/09bd3007d96fb6629633fa2bebf5c36c00a9e31b/nonebot_plugin_bilichat/__init__.py#L124-L126

channel_id也是同上,这里进行二次校验的话,黑白名单也就不仅仅只对群生效,qq号和频道号也可以用于黑白名单

Well2333 commented 1 year ago

这里原本就是这么设计的,对于私聊不会添加判断,不过这点也可以修改一下

Well2333 commented 1 year ago

fix #80