shreemaan-abhishek commented on issue #11608: URL: https://github.com/apache/apisix/issues/11608#issuecomment-2478825879
@ShaunMaher, the `body-transformer` plugin's execution priority is lower than `key-auth` and when `key-auth` fails, the rewrite phase is aborted, this means the `body-transformer` plugin's rewrite function is not executed. Due to this, `ctx.body_transformer_conf` ends up being uninitialized: https://github.com/apache/apisix/blob/4bbb7cce2a16533df8d36ac0ac35734b40132d55/apisix/plugins/body-transformer.lua#L194 But during body_filter phase, body-transformer's body_filter function is called an APISIX panics because `ctx.body_transformer_conf` is nil: https://github.com/apache/apisix/blob/4bbb7cce2a16533df8d36ac0ac35734b40132d55/apisix/plugins/body-transformer.lua#L219-L220. This can be fixed just by adding a nil check. -- 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]
