Revolyssup commented on issue #9831:
URL: https://github.com/apache/apisix/issues/9831#issuecomment-1676694775

   Summarising the issue and fix:
   The upstream field is of type object so if normally user enters a string, it 
will give error on schema validation and will not be stored in etcd. But if, 
after storing in etcd, the config is manipulated such that `upstream` is set as 
string then this will give error here[1] as the code tries to access a field on 
type "string". To avoid this scenario, the above mentioned PR adds a check 
which makes sure that the field is accessed only if `upstream` is an 
object(table in lua). 
   
   1. 
https://github.com/apache/apisix/blob/01763b5ddae1ba4f6d52778fad420aa4221c3c44/apisix/plugins/traffic-split.lua#L205


-- 
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