{"record":{"id":"7c43811cf937049f","repo":"jeecgboot/JeecgBoot","slug":"timastamp","errorCode":null,"errorMessage":"timastamp时间戳为空","messagePattern":"timastamp时间戳为空","errorType":"validation","errorClass":"JeecgBootException","httpStatus":null,"severity":"error","filePath":"jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/filter/ApiAuthFilter.java","lineNumber":202,"sourceCode":"    }\n    //update-end---author:scott ---date:20260416  for：【PR/9083】OpenAPI白名单增强，支持CIDR网段和通配符匹配-----------\n\n    /**\n     * 签名验证\n     * @param appkey\n     * @param signature\n     * @param timestamp\n     * @return\n     */\n    protected void checkSignValid(String appkey, String signature, String timestamp) {\n        if (!StringUtils.hasText(appkey)) {\n            throw new JeecgBootException(\"appkey为空\");\n        }\n        if (!StringUtils.hasText(signature)) {\n            throw new JeecgBootException(\"signature为空\");\n        }\n        if (!StringUtils.hasText(timestamp)) {\n            throw new JeecgBootException(\"timastamp时间戳为空\");\n        }\n        if (!timestamp.matches(\"[0-9]*\")) {\n            throw new JeecgBootException(\"timastamp时间戳不合法\");\n        }\n        if (System.currentTimeMillis() - Long.parseLong(timestamp) > 5 * 60 * 1000) {\n            throw new JeecgBootException(\"signature签名已过期(超过五分钟)\");\n        }\n    }\n\n    /**\n     * 认证信息核验\n     * @param appKey\n     * @param signature\n     * @param timestamp\n     * @param openApiAuth\n     * @return\n     * @throws Exception\n     */","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/jeecgboot/JeecgBoot/blob/96fb33f5ec68516da0b0147da06b2eb0419e063a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/openapi/filter/ApiAuthFilter.java#L184-L220","documentation":"Thrown by checkSignValid when the timestamp parameter is blank. Note the message contains a typo ('timastamp') which is preserved as-is in the source. timestamp is required because it is part of the signed payload and used for the 5-minute expiry window.","triggerScenarios":"OpenAPI call with no timestamp param; client sends timestamp only in a differently-named field; clock/payload serialization drops the field.","commonSituations":"Client SDK omission; parameter name mismatch; test harness that omits timestamp.","solutions":["Send timestamp as a millisecond-precision epoch string in the param/header the filter reads.","Verify the exact parameter name against the filter's doFilterInternal extraction.","Ensure all three credentials (appkey, signature, timestamp) are sent together."],"exampleFix":"// before: request without timestamp\n// after:  String ts = String.valueOf(System.currentTimeMillis());\n//         request.addHeader(\"timestamp\", ts);","handlingStrategy":"validation","validationCode":"if (timestamp == null || timestamp.trim().isEmpty()) {\n    throw new IllegalStateException(\"timestamp required\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate timestamp in the same builder that sets appkey/signature.","Use the exact parameter name the filter expects.","Add a client integration test that asserts the three credentials are sent."],"tags":["openapi","auth","signature","input-validation"],"backgroundTag":null,"analyzedSha":"96fb33f5ec68516da0b0147da06b2eb0419e063a","analyzedAt":"2026-08-14T00:04:16.786Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}