tilfinltd / aws-extend-switch-roles

Extend your AWS IAM switching roles by Chrome extension, Firefox add-on, or Edge add-on
https://chromewebstore.google.com/detail/aws-extend-switch-roles/jpmkfafbacpgapdghgdpembnojdlgkdl?utm_source=github
MIT License
1.32k stars 141 forks source link

Extension works only once #205

Closed tsunamaru closed 2 years ago

tsunamaru commented 3 years ago

Hi!

On latest Firefox 89, extension breaks immediately after first call, and shows "Failed to fetch user info from the AWS Management Console page" until you reload page. That's what I see in console:

Uncaught ReferenceError: ConsoleNavService is not defined
    <anonymous> moz-extension://d42a4ab9-908f-402d-86d4-b94f8a1fe87b/js/attach_target.js:6
    <anonymous> moz-extension://d42a4ab9-908f-402d-86d4-b94f8a1fe87b/js/attach_target.js:23
attach_target.js:6:19
Uncaught ReferenceError: ConsoleNavService is not defined
    <anonymous> moz-extension://d42a4ab9-908f-402d-86d4-b94f8a1fe87b/js/attach_target.js:6
    <anonymous> moz-extension://d42a4ab9-908f-402d-86d4-b94f8a1fe87b/js/attach_target.js:23
attach_target.js:6:19
Uncaught ReferenceError: ConsoleNavService is not defined
    <anonymous> moz-extension://d42a4ab9-908f-402d-86d4-b94f8a1fe87b/js/attach_target.js:6
    <anonymous> moz-extension://d42a4ab9-908f-402d-86d4-b94f8a1fe87b/js/attach_target.js:23
attach_target.js:6:19
Uncaught ReferenceError: ConsoleNavService is not defined
    <anonymous> moz-extension://d42a4ab9-908f-402d-86d4-b94f8a1fe87b/js/attach_target.js:6
    <anonymous> moz-extension://d42a4ab9-908f-402d-86d4-b94f8a1fe87b/js/attach_target.js:23
attach_target.js:6:19

Video demonstration: https://youtu.be/SoJU6G6mYk8

tilfin commented 3 years ago

It seems to be happening only on the new EC2 dashboard.

ColinHalter commented 3 years ago

Hello,

On chrome, I'm seeing the same issue in any service (Not just EC2). Console is giving the following error:

content.js:88 Blocked form submission to 'https://signin.aws.amazon.com/switchrole' because the form's frame is sandboxed and the 'allow-forms' permission is not set. (anonymous) @ content.js:88

Switching roles works once, but trying again will just do nothing.

tilfin commented 2 years ago

The cause has been identified. New feature pages in the AWS Console have multiple iframes, and AESR sends the control message to not only main body but also a part of iframes.