PromucFlow_constructor/app
Nilesh Sarupriya e39d6af9ef
fix: remove padding from state used in OIDC authorise (#20433)
## Description

> Cognito returns **Malformed URI** for redirect when User tries to
Login. Due to this, browser ends up throwing `400 Bad Request`. In order
to fix this, we have removed the padding from the `state` query
parameter which we send to the OIDC, in order to avoid the cases where
the additional `=` will lead to malformed URIs being created. Read
[here](https://stackoverflow.com/questions/6916805/why-does-a-base64-encoded-string-have-an-sign-at-the-end)
for Additional information on the Base64 encoding and padding.
> Also, we are changing the delimiter from `=` to `-` when server tries
to find the redirect URI for other use cases.
> Server uses `,` in order to split the state to get the `origin value`.
Now we will use `@` instead of `,`.

> TL;DR, remove `=` and `,` in order to avoid malformed URI strings.

Fixes https://github.com/appsmithorg/appsmith/issues/19692

Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video

## Type of change

- Breaking change (fix or feature that would cause existing
functionality to not work as expected)


## How Has This Been Tested?
> Tested manually with different use case scenarios.

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
2023-02-07 19:20:00 +05:30
..
client fix: Refactor dataTree diff translation (#20180) 2023-02-07 17:30:06 +05:30
rts fix: Unblocking CI - Unexpected cyclic dependency error and Lint spec fixes (#20260) 2023-01-31 20:33:10 +06:00
server fix: remove padding from state used in OIDC authorise (#20433) 2023-02-07 19:20:00 +05:30
shared fix: Unblocking CI - Unexpected cyclic dependency error and Lint spec fixes (#20260) 2023-01-31 20:33:10 +06:00
util chore: bump decode-uri-component from 0.2.0 to 0.2.2 in /app/util/plugin-generation (#18658) 2022-12-07 11:00:38 +05:30
yarn.lock Commented Delete Test (#8589) 2021-10-26 22:26:26 +05:30