-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(limit-count): conf with group and disable can't be configured #7384
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apisix/apisix/plugins/limit-count.lua
Lines 153 to 168 in 2f7833e
local fields = {} | |
for k in pairs(schema.properties) do | |
tab_insert(fields, k) | |
end | |
local extra = policy_to_additional_properties[conf.policy] | |
if extra then | |
for k in pairs(extra.properties) do | |
tab_insert(fields, k) | |
end | |
end | |
local prev_conf = group_conf_lru(conf.group, "", group_conf, conf) | |
for _, field in ipairs(fields) do | |
if not core.table.deep_eq(prev_conf[field], conf[field]) then | |
core.log.error("previous limit-conn group ", prev_conf.group, |
We use a whitelist for the fields which need to be compared, and disable
is expected not in the list?
Yes, it's injected in: https://github.com/apache/apisix/blob/master/apisix/plugin.lua#L139-L162 |
The whitelist for the fields does not work as it should, because the schema may be injected into other fields, currently there are |
Description
Fixes #7375
Checklist