You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Revolyssup (via GitHub)" <gi...@apache.org> on 2023/09/25 06:28:32 UTC

[GitHub] [apisix] Revolyssup commented on a diff in pull request #9995: fix: safely check for upstream field in traffic split plugin

Revolyssup commented on code in PR #9995:
URL: https://github.com/apache/apisix/pull/9995#discussion_r1335429658


##########
apisix/plugins/traffic-split.lua:
##########
@@ -200,7 +200,7 @@ local function new_rr_obj(weighted_upstreams)
     for i, upstream_obj in ipairs(weighted_upstreams) do
         if upstream_obj.upstream_id then
             server_list[upstream_obj.upstream_id] = upstream_obj.weight
-        elseif upstream_obj.upstream then
+        elseif upstream_obj.upstream and type(upstream_obj.upstream) == "table" then

Review Comment:
   so should we not fix this on apisix's end since this data was not potentially corrupted by APISIX? Should I close this PR?



-- 
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-unsubscribe@apisix.apache.org

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