Current Behavior
The Sign plugin has malformed-input paths that can throw unchecked exceptions instead of returning the normal signature verification failure response.
Examples in current origin/master:
VersionTwoExtractor.extract() Base64-decodes and JSON-parses the first token segment without handling bad input.
ComposableSignService.verifyExpires() only checks that the timestamp is nonblank before calling Long.parseLong(...).
- In the no-body verification path,
SignPlugin.doExecute() does not convert these unchecked exceptions into SIGN_IS_NOT_PASS.
Malformed signature headers or nonnumeric timestamps can therefore escape as server errors instead of clean verification failures.
Expected Behavior
Invalid or malformed sign parameters should return the configured sign verification failure response, not an uncaught runtime exception.
Steps to Reproduce
- Enable the Sign plugin on a route.
- Send a request with malformed
ShenYu-Authorization / Authorization sign data, or with a nonnumeric timestamp in the decoded sign parameters.
- The plugin can throw during extraction or expiry verification instead of returning
SIGN_IS_NOT_PASS.
Code Location
shenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/extractor/VersionTwoExtractor.java
shenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/service/ComposableSignService.java
shenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/SignPlugin.java
Current Behavior
The Sign plugin has malformed-input paths that can throw unchecked exceptions instead of returning the normal signature verification failure response.
Examples in current
origin/master:VersionTwoExtractor.extract()Base64-decodes and JSON-parses the first token segment without handling bad input.ComposableSignService.verifyExpires()only checks that the timestamp is nonblank before callingLong.parseLong(...).SignPlugin.doExecute()does not convert these unchecked exceptions intoSIGN_IS_NOT_PASS.Malformed signature headers or nonnumeric timestamps can therefore escape as server errors instead of clean verification failures.
Expected Behavior
Invalid or malformed sign parameters should return the configured sign verification failure response, not an uncaught runtime exception.
Steps to Reproduce
ShenYu-Authorization/Authorizationsign data, or with a nonnumeric timestamp in the decoded sign parameters.SIGN_IS_NOT_PASS.Code Location
shenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/extractor/VersionTwoExtractor.javashenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/service/ComposableSignService.javashenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/SignPlugin.java