Skip to content

Commit 2d4278a

Browse files
committed
change error for invalid algorithm to invalidArgument
Signed-off-by: nadav mizrahi <[email protected]>
1 parent a555e65 commit 2d4278a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/endpoint/s3/s3_utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ function parse_sse(req) {
226226
}
227227
}
228228

229-
if (algorithm !== 'AES256' && algorithm !== 'aws:kms') throw new S3Error(S3Error.InvalidDigest);
229+
if (algorithm !== 'AES256' && algorithm !== 'aws:kms') throw new S3Error(S3Error.InvalidArgument);
230230

231-
if (algorithm === 'aws:kms' && !kms_key_id) throw new S3Error(S3Error.InvalidDigest);
231+
if (algorithm === 'aws:kms' && !kms_key_id) throw new S3Error(S3Error.InvalidArgument);
232232
// const md5_regex = new RegExp('/^[a-f0-9]{32}$/');
233233
// if (kms_key_id && !md5_regex.test(kms_key_id)) throw new S3Error(S3Error.InvalidDigest);
234234

0 commit comments

Comments
 (0)