AlinsRan commented on PR #13680:
URL: https://github.com/apache/apisix/pull/13680#issuecomment-4955542895

   Reworked along the lines you suggested — the fork is out, `patch.lua` now 
sets `decode_array_with_array_mt` on both singletons and wraps `cjson.new` / 
`cjson.safe.new` so dependency-owned instances inherit it.
   
   Two notes on the implementation:
   
   - The wrap is recursive (`patch_cjson(instance)` inside the wrapper), so an 
instance created from another instance is covered too. Cheap, and it closes the 
hole rather than leaving a one-level guarantee.
   - Added `t/core/json.t` TEST 9 covering `cjson.new()`, `cjson.safe.new()` 
and the plain `cjson` singleton. It fails without the patch.
   
   Verified locally that `t/plugin/openid-connect-userinfo-array.t` now passes 
against the **unmodified upstream** `lua-resty-session` (rockspec reverted to 
`4.1.5-1`), and fails without the patch — so the fix is doing the work, not the 
dependency. Agreed on the full-suite point: `t/core/`, `t/node/healthcheck.t` 
and `t/core/config_etcd.t` show no new failures against a pre-patch baseline 
locally, and CI covers the rest.


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