Skip to content

Commit c8dd70c

Browse files
authored
fix postpolicy condition key check (#1154)
1 parent 8ace1e9 commit c8dd70c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/src/main/java/io/minio/PostPolicy.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public Map<String, String> formData(@Nonnull Credentials creds, @Nonnull String
189189
throw new IllegalArgumentException("region cannot be empty");
190190
}
191191

192-
if (!conditions.get(EQ).containsKey("key") && conditions.get(STARTS_WITH).containsKey("key")) {
192+
if (!conditions.get(EQ).containsKey("key") && !conditions.get(STARTS_WITH).containsKey("key")) {
193193
throw new IllegalArgumentException("key condition must be set");
194194
}
195195

0 commit comments

Comments
 (0)