-
Notifications
You must be signed in to change notification settings - Fork 477
Open
Labels
no-action-neededThe issue is either fixed, addressed better by other issues, or just out of product scope.The issue is either fixed, addressed better by other issues, or just out of product scope.waiting-for-infoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.
Description
自定义返回获取token时使用函数Auth.uploadToken时forceSaveKey参数不生效
public String uploadToken(String bucket, String key, long expires, StringMap policy) {
return uploadToken(bucket, key, expires, policy, true);
}
因为最终调用的函数copyPolicy会过滤掉部分参数,forceSaveKey就回不生效。字段「白名单」policyFields并不包含该参数
private static void copyPolicy(final StringMap policy, StringMap originPolicy, final boolean strict) {
if (originPolicy == null) {
return;
}
originPolicy.forEach(new StringMap.Consumer() {
@OverRide
public void accept(String key, Object value) {
if (StringUtils.inStringArray(key, deprecatedPolicyFields)) {
throw new IllegalArgumentException(key + " is deprecated!");
}
if (!strict || StringUtils.inStringArray(key, policyFields)) {
policy.put(key, value);
}
}
});
}
Metadata
Metadata
Assignees
Labels
no-action-neededThe issue is either fixed, addressed better by other issues, or just out of product scope.The issue is either fixed, addressed better by other issues, or just out of product scope.waiting-for-infoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.