-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix / sso: make sure to delete only loginToken after redirect #16415
Conversation
…ginToken query-param from the window.location api. Related to element-hq#16292 Signed-off-by: Bekliev Parviz <[email protected]>
21b4047
to
3e57378
Compare
I believe @t3chguy is best positioned to review this. |
By the way, I checked this functionality locally and it works correctly: removes only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we can replace this code to use URL? https://developer.mozilla.org/en-US/docs/Web/API/URL/URL
Should simplify it for this change and also follows the guidance for the package as url.parse
has been deprecated https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost
@t3chguy I think I can do that - gonna try to use the |
ff7412d
to
40fb2f3
Compare
40fb2f3
to
dd46386
Compare
// Remove trailing slash if present | ||
u.pathname = u.pathname.replace(/\/$/, ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it does look like the behaviour here has been lost.
Previously it'd pass through things like riot.im/app
happily too but I think now that'll instead just be riot.im
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... will check that out soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dd46386
to
c483a8c
Compare
Related to element-hq#16292 Signed-off-by: Bekliev Parviz <[email protected]>
c483a8c
to
92a5787
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!!
Changes in [1.7.22](https://github.com/vector-im/element-web/releases/tag/v1.7.22) (2021-03-01) =============================================================================================== [Full Changelog](element-hq/element-web@v1.7.22-rc.1...v1.7.22) ## Security notice Element Web 1.7.22 fixes (by upgrading to matrix-react-sdk 3.15.0) a low severity issue (CVE-2021-21320) where the user content sandbox can be abused to trick users into opening unexpected documents. The content is opened with a `blob` origin that cannot access Matrix user data, so messages and secrets are not at risk. Thanks to @keerok for responsibly disclosing this via Matrix's Security Disclosure Policy. ## All changes * Upgrade to React SDK 3.15.0 and JS SDK 9.8.0 Changes in [1.7.22-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.22-rc.1) (2021-02-24) ========================================================================================================= [Full Changelog](element-hq/element-web@v1.7.21...v1.7.22-rc.1) * Upgrade to React SDK 3.15.0-rc.1 and JS SDK 9.8.0-rc.1 * Translations update from Weblate [\#16529](element-hq/element-web#16529) * Add hostSignup config for element.io clients [\#16515](element-hq/element-web#16515) * VoIP virtual rooms, mkII [\#16442](element-hq/element-web#16442) * Jitsi widget: Read room name from query parameters [\#16456](element-hq/element-web#16456) * fix / sso: make sure to delete only loginToken after redirect [\#16415](element-hq/element-web#16415) * Disable Countly [\#16433](element-hq/element-web#16433) Changes in [1.7.21](https://github.com/vector-im/element-web/releases/tag/v1.7.21) (2021-02-16) =============================================================================================== [Full Changelog](element-hq/element-web@v1.7.21-rc.1...v1.7.21) * Upgrade to React SDK 3.14.0 and JS SDK 9.7.0 Changes in [1.7.21-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.21-rc.1) (2021-02-10) ========================================================================================================= [Full Changelog](element-hq/element-web@v1.7.20...v1.7.21-rc.1) * Upgrade to React SDK 3.14.0-rc.1 and JS SDK 9.7.0-rc.1 * Translations update from Weblate [\#16427](element-hq/element-web#16427) * Add RegExp dotAll feature test [\#16408](element-hq/element-web#16408) * Fix Electron type merging [\#16405](element-hq/element-web#16405) * README: remove Jenkins reference [\#16381](element-hq/element-web#16381) * Enable PostCSS Calc in webpack builds [\#16307](element-hq/element-web#16307) * Add configuration security best practices to the README. [\#16367](element-hq/element-web#16367) * Upgrade matrix-widget-api [\#16347](element-hq/element-web#16347) Changes in [1.7.20](https://github.com/vector-im/element-web/releases/tag/v1.7.20) (2021-02-04) =============================================================================================== [Full Changelog](element-hq/element-web@v1.7.19...v1.7.20) * Upgrade to React SDK 3.13.1 Changes in [1.7.19](https://github.com/vector-im/element-web/releases/tag/v1.7.19) (2021-02-03) =============================================================================================== [Full Changelog](element-hq/element-web@v1.7.19-rc.1...v1.7.19) * Upgrade to React SDK 3.13.0 and JS SDK 9.6.0 * [Release] Upgrade matrix-widget-api [\#16348](element-hq/element-web#16348) Changes in [1.7.19-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.19-rc.1) (2021-01-29) ========================================================================================================= [Full Changelog](element-hq/element-web@v1.7.18...v1.7.19-rc.1) * Upgrade to React SDK 3.13.0-rc.1 and JS SDK 9.6.0-rc.1 * Translations update from Weblate [\#16314](element-hq/element-web#16314) * Use history replaceState instead of redirect for SSO flow [\#16292](element-hq/element-web#16292) * Document the mobile guide toast option [\#16301](element-hq/element-web#16301) * Update widget-api to beta.12 [\#16303](element-hq/element-web#16303) * Upgrade deps 2021-01 [\#16294](element-hq/element-web#16294) * Move to newer base image for Docker builds [\#16275](element-hq/element-web#16275) * Docs for the VoIP translate pattern option [\#16236](element-hq/element-web#16236) * Fix Riot->Element in permalinkPrefix docs [\#16227](element-hq/element-web#16227) * Supply server_name for optional federation-capable Jitsi auth [\#16215](element-hq/element-web#16215) * Fix Widget API version confusion [\#16212](element-hq/element-web#16212) * Add Hebrew language [\#16210](element-hq/element-web#16210) * Update widget-api to beta 11 [\#16177](element-hq/element-web#16177) * Fix develop Docker builds [\#16192](element-hq/element-web#16192) * Skip the service worker for Electron [\#16157](element-hq/element-web#16157) * Use isolated IPC API [\#16137](element-hq/element-web#16137) Changes in [1.7.18](https://github.com/vector-im/element-web/releases/tag/v1.7.18) (2021-01-26) =============================================================================================== [Full Changelog](element-hq/element-web@v1.7.17...v1.7.18) * Upgrade to React SDK 3.12.1 and JS SDK 9.5.1 Changes in [1.7.17](https://github.com/vector-im/element-web/releases/tag/v1.7.17) (2021-01-18) =============================================================================================== [Full Changelog](element-hq/element-web@v1.7.17-rc.1...v1.7.17) * Upgrade to React SDK 3.12.0 and JS SDK 9.5.0 Changes in [1.7.17-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.7.17-rc.1) (2021-01-13) ========================================================================================================= [Full Changelog](element-hq/element-web@v1.7.16...v1.7.17-rc.1) * Upgrade to React SDK 3.12.0-rc.1 and JS SDK 9.5.0-rc.1 * Translations update from Weblate [\#16131](element-hq/element-web#16131) * webplatform: Fix notification closing [\#16028](element-hq/element-web#16028) * Stop building code and types for Element layer [\#15999](element-hq/element-web#15999)
Related to #16292