jiangfucheng commented on code in PR #9778:
URL: https://github.com/apache/apisix/pull/9778#discussion_r1257402892


##########
apisix/plugins/consumer-restriction.lua:
##########
@@ -86,7 +86,11 @@ local fetch_val_funcs = {
 }
 
 local function is_include(value, tab)
-    for k,v in ipairs(tab) do
+    if not value then
+        return false
+    end

Review Comment:
   1.For `consumer`, if have no corresponding `consumer_id`, we can assume that 
the user is unauthorized, it is reasonable for us to reject this request.
   2.For `service` and `consumer_group`, they are not necessary, it will make 
user confused if we reject this request directly when the `service_id` or 
`consumer_group_id` not exists. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to