You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/03 00:50:19 UTC

[I] [BUG] ComposableSignService.handleExchange silently discards the APP_PARAM header mutation [shenyu]

Aias00 opened a new issue, #6634:
URL: https://github.com/apache/shenyu/issues/6634

   - Severity: High
   - Location:
   `shenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/service/ComposableSignService.java:229`
   - 
   Description:
   After successful signature verification, `handleExchange` is meant to forward the configured `appParam` to the upstream as the `appParam` request header. The implementation does `.ifPresent(param -> exchange.getRequest().mutate().headers(httpHeaders -> httpHeaders.set(Constants.APP_PARAM, param)).build());`. `ServerHttpRequest.mutate()` returns a builder whose `.build()` produces a *new* `ServerHttpRequest` — but that built request is the lambda's return value and is thrown away by `ifPresent`. It is never stored back into the exchange, and `handleExchange` (return type `void`) never propagates a new exchange to the chain. `SignPlugin.doExecute` then calls `chain.execute(exchange)` on the original, unmutated exchange.
   - 
   Impact:
   The per-app `paramDataList`/`appParam` feature is completely non-functional: configured app parameters are computed and then dropped — the `appParam` header never reaches the upstream.
   - 
   Suggested fix:
   Directly mutate the original request's headers: `.ifPresent(param -> exchange.getRequest().getHeaders().set(Constants.APP_PARAM, param));` — or restructure `handleExchange` to return a mutated `ServerWebExchange` and have `SignPlugin` execute the chain on it.
   - 
   Confidence: High
   - Related existing: none
   
   ---
   _Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.md)._


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

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


Re: [I] [BUG] ComposableSignService.handleExchange silently discards the APP_PARAM header mutation [shenyu]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6634: [BUG] ComposableSignService.handleExchange silently discards the APP_PARAM header mutation
URL: https://github.com/apache/shenyu/issues/6634


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

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


Re: [I] [BUG] ComposableSignService.handleExchange silently discards the APP_PARAM header mutation [shenyu]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6634:
URL: https://github.com/apache/shenyu/issues/6634#issuecomment-5161208444

   👋 Hello @Aias00
   
   A new issue has been opened by @Aias00:
   - **Title**: [BUG] ComposableSignService.handleExchange silently discards the APP_PARAM header mutation
   - **Link**: https://github.com/apache/shenyu/issues/6634
   
   Please review when you have time. Thank you! 🙏


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

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