Skip to content

Commit 2cb47cc

Browse files
committed
Fixing SAML redirect handling
1 parent 908b7e7 commit 2cb47cc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

containerize.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ function listener(details) {
175175

176176
return {};
177177
}
178+
178179
function accountNameListener(details) {
179180
// Intercept our response
180181
let filter = browser.webRequest.filterResponseData(details.requestId);
@@ -208,17 +209,17 @@ function accountNameListener(details) {
208209
}
209210

210211
return {};
211-
212212
}
213213

214214
async function samlListener(details) {
215+
// check to make sure we only handle this on redirects
216+
if (details.statusCode != 302) {
217+
return {};
218+
}
219+
215220
async function process(result) {
216221
onGot(result);
217222

218-
if (details.statusCode != 302) {
219-
return {};
220-
}
221-
222223
const setCookie = details.responseHeaders.find(header => header.name == "set-cookie");
223224
const redirectUrl = details.responseHeaders.find(header => header.name == "location").value;
224225

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "AWS SSO Containers",
4-
"version": "1.10",
4+
"version": "1.11",
55
"description": "Automatically places AWS SSO calls into containers.",
66
"browser_specific_settings": {
77
"gecko": {

0 commit comments

Comments
 (0)