From 2cb47cc7a61590efc61a45a2a3b5a8cce92f3d2d Mon Sep 17 00:00:00 2001 From: Joseph Pintozzi Date: Sat, 21 Sep 2024 08:59:09 -0500 Subject: [PATCH] Fixing SAML redirect handling --- containerize.js | 11 ++++++----- manifest.json | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/containerize.js b/containerize.js index bb3f3dd..e4a9150 100644 --- a/containerize.js +++ b/containerize.js @@ -175,6 +175,7 @@ function listener(details) { return {}; } + function accountNameListener(details) { // Intercept our response let filter = browser.webRequest.filterResponseData(details.requestId); @@ -208,17 +209,17 @@ function accountNameListener(details) { } return {}; - } async function samlListener(details) { + // check to make sure we only handle this on redirects + if (details.statusCode != 302) { + return {}; + } + async function process(result) { onGot(result); - if (details.statusCode != 302) { - return {}; - } - const setCookie = details.responseHeaders.find(header => header.name == "set-cookie"); const redirectUrl = details.responseHeaders.find(header => header.name == "location").value; diff --git a/manifest.json b/manifest.json index b5289d2..9690157 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "AWS SSO Containers", - "version": "1.10", + "version": "1.11", "description": "Automatically places AWS SSO calls into containers.", "browser_specific_settings": { "gecko": {