vector-im-hydrogen-web/src
Paulo Pinto ad02c1625f Encode SSO redirect URL as it may contain multiple query parameters
If the returnURL contains multiple query parameters (e.g. http://localhost:3000?foo=bar&bar=baz), the homeserver would fail to correctly parse the URL, and only the first query parameter would be kept.

This is not an issue with the homeserver since the URL cannot be parsed in an unambiguous way, as the resulting URL would be:

https://example.com/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:3000?foo=bar&bar=baz

It's not possible to know whether the bar parameter is part of the "parent" URL, or part of the redirectUrl parameter.

----

To fix this, we now encode the redirectUrl parameter, which results in:

https://example.com/_matrix/client/r0/login/sso/redirect?redirectUrl=http%3A%2F%2Flocalhost%3A3000%2Fparent.html%3Ffoo%3Dbar%26bar%3Dbaz

This URL is correctly parsed by synapse.
2022-10-27 15:42:24 +01:00
..
domain Merge pull request #867 from ibeckermayer/ibeckermayer/ts-conversion-linkify 2022-10-17 15:42:15 +00:00
fixtures/matrix/invites add Invite class 2021-04-20 16:21:27 +02:00
logging fix ts errors 2022-02-10 16:44:40 +01:00
matrix Encode SSO redirect URL as it may contain multiple query parameters 2022-10-27 15:42:24 +01:00
mocks use withReply 2022-01-14 18:15:26 +05:30
observable fix sdk build failing on tsc error 2022-10-14 20:13:23 +02:00
platform Merge pull request #862 from vector-im/madlittlemods/remove-unused-button-styles-that-conflict 2022-10-11 16:36:13 +00:00
utils Merge pull request #670 from vector-im/bwindels/ts-olm 2022-03-01 18:53:22 +01:00
index.html Fix SDK build 2022-04-13 17:12:38 +05:30
lib.ts Make no content PL fallback to 0 (#863) 2022-10-17 15:59:24 -05:00