fix(security): F01 授权门禁不可被配置关闭 + F02 业务坐标按可信来源隔离(含唯一键 SQL)
build / build-push (push) Failing after 1m1s
build / build-push (push) Failing after 1m1s
This commit is contained in:
@@ -18,8 +18,12 @@ public class FlowSourcePrincipalResolver {
|
||||
if (authenticatedAppKey == null || authenticatedAppKey.trim().isEmpty()) {
|
||||
throw new BizException(ErrorCode.UNAUTHORIZED, "缺少已认证的调用应用");
|
||||
}
|
||||
JsonNode app = appClient.getAppByKey(authenticatedAppKey);
|
||||
if (app == null || !app.path("id").isIntegralNumber()) {
|
||||
JsonNode app;
|
||||
try { app = appClient.getAppByKey(authenticatedAppKey.trim()); }
|
||||
catch (RuntimeException unavailable) {
|
||||
throw new BizException(ErrorCode.UNAUTHORIZED, "调用应用主体查询不可用");
|
||||
}
|
||||
if (app == null || !app.path("id").isIntegralNumber() || app.path("id").intValue() <= 0) {
|
||||
throw new BizException(ErrorCode.UNAUTHORIZED, "调用应用主体不可解析");
|
||||
}
|
||||
String source = app.path("sourcePrincipalId").asText("");
|
||||
|
||||
Reference in New Issue
Block a user