From 78779f563c1a3b0ee1008bc977aa23c754f65aac Mon Sep 17 00:00:00 2001 From: Paul Kozlov Date: Tue, 23 Jul 2024 20:49:21 +0300 Subject: [PATCH] Do not add SessionDuration to request when it is empty in configuration --- background/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/background/script.js b/background/script.js index aaf8324..8819243 100644 --- a/background/script.js +++ b/background/script.js @@ -264,7 +264,7 @@ async function assumeRoleWithSAML(roleClaimValue, SAMLAssertion, SessionDuration RoleArn: RoleArn, SAMLAssertion: SAMLAssertion }; - if (SessionDuration !== null) { + if (SessionDuration !== null && SessionDuration !== "") { params['DurationSeconds'] = SessionDuration; } @@ -319,7 +319,7 @@ async function assumeRole(roleArn, roleSessionName, AccessKeyId, SecretAccessKey RoleArn: roleArn, RoleSessionName: roleSessionName }; - if (SessionDuration !== null) { + if (SessionDuration !== null && SessionDuration !== "") { params['DurationSeconds'] = SessionDuration; } const command = new webpacksts.AWSAssumeRoleCommand(params);