You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Cryptor JsonUtil.parser throws NPE/CCE on JSON-array or non-object bodies and missing nested-field segments — 500s on valid and pre-auth traffic #6879
Both removeRule implementations gate the cache eviction behind Optional.ofNullable(ruleData.getHandle()).ifPresent(s -> CACHED_HANDLE.get().removeHandle(...)). If the rule-deletion event carries only the rule id (handle == null), ifPresent never fires and the cached SignRuleHandler / CryptorRuleHandler keyed by selectorId_ruleId is never evicted. Contrast JwtPluginDataHandler.removeRule:56-58, KeyAuthPluginDataHandler.removeRule:45-47, and BasicAuthPluginDataHandler.removeRule:55-57, which all call removeHandle unconditionally.
Stale rule-handle objects accumulate in the CommonHandleCache indefinitely (memory leak). For cryptor, a stale CryptorRuleHandler (containing decryptKey/encryptKey/strategyName/fieldNames/way) persists; for sign, a stale SignRuleHandler (the signRequestBody flag) persists.
Suggested fix
Drop the getHandle() guard and call CACHED_HANDLE.get().removeHandle(CacheKeyUtils.INST.getKey(ruleData)) unconditionally (as JWT/key-auth/basic-auth already do), guarding only on ruleData itself.
Related existing
None — distinct from NEW-06 (#6772, removeRule handle guard), which lists redirect/rewrite/param-mapping/modify-response/context-path. The sign and cryptor data handlers are the same bug class but were omitted from NEW-06's file list; they are separate plugins with separate cached handle types.
Title: [BUG] Cryptor JsonUtil.parser throws NPE/CCE on JSON-array or non-object bodies and missing nested-field segments — 500s on valid and pre-auth traffic
Activity
github-actions commentedon Aug 4, 2026
👋 Hello @yuluo-yx
A new issue has been opened by @Aias00:
Please review when you have time. Thank you! 🙏
zhang-arvin commentedon Aug 30, 2026
I will work on this.
[type: bug] Fix Cryptor/Sign plugin removeRule to unconditionally cle…
[type: bug] Fix Cryptor/Sign plugin removeRule to unconditionally cle…