soulbird commented on code in PR #6908:
URL: https://github.com/apache/apisix/pull/6908#discussion_r857051484


##########
apisix/schema_def.lua:
##########
@@ -37,7 +37,7 @@ local id_schema = {
     }
 }
 
-local host_def_pat = "^\\*?[0-9a-zA-Z-._]+$"
+local host_def_pat = "^\\*?[0-9a-zA-Z-._\\[\\]:]+$"

Review Comment:
   > I would prefer to a simple regex check as a complex check is error-prone 
(may reject valid input)
   
   So I'm leaning towards a more conservative way of fixing it, like this 
currently. @zhendongcmss 



##########
t/plugin/referer-restriction.t:
##########
@@ -173,7 +173,6 @@ hello world
             local cases = {
                 "x.*",
                 "~y.xn",
-                "::1",

Review Comment:
   In fact, referer is a URL, and the current shcema check is not suitable. 
Maybe we need another PR to fix this



-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to