-
Notifications
You must be signed in to change notification settings - Fork 52
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: Decode spaces in factory url #976
Conversation
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
Codecov Report
@@ Coverage Diff @@
## main #976 +/- ##
==========================================
- Coverage 85.15% 85.13% -0.02%
==========================================
Files 380 380
Lines 39186 39198 +12
Branches 2523 2523
==========================================
+ Hits 33370 33373 +3
- Misses 5789 5798 +9
Partials 27 27
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-976 |
@@ -37,6 +37,10 @@ export function registerFactoryAcceptanceRedirect(instance: FastifyInstance): vo | |||
params.append(ERROR_CODE_ATTR, querystring.unescape(query[ERROR_CODE_ATTR] as string)); | |||
} | |||
|
|||
const url = params.get('url'); | |||
if (url) { | |||
params.set('url', url.replaceAll(' ', '%20')); |
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.
can we use encodeURIComponent
to cover the general case? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-976 |
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
/retest |
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.
I'm ok to merge as a hot fix for 3.10, but not really understand why do we decoding twice in general🤷
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-976 |
Signed-off-by: Anatolii Bazko <[email protected]>
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-976 |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy, ibuziuk, olexii4, tolusha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Build 3.10 :: dashboard_3.10/19: Console, Changes, Git Data |
Build 3.11 :: dashboard_3.x/391: Console, Changes, Git Data |
Build 3.10 :: sync-to-downstream_3.10/123: Console, Changes, Git Data |
Build 3.11 :: sync-to-downstream_3.x/5216: Console, Changes, Git Data |
Build 3.10 :: get-sources-rhpkg-container-build_3.10/123: dashboard : 3.10 :: Build 56864823 : dashboard-rhel8-3.10-53 |
Build 3.10 :: dashboard_3.10/19: Upstream sync done; /DS_CI/sync-to-downstream_3.10/123 triggered |
Build 3.11 :: get-sources-rhpkg-container-build_3.x/5095: dashboard : 3.x :: Build 56864929 : dashboard-rhel8-3.11-19 |
Build 3.11 :: dashboard_3.x/391: Upstream sync done; /DS_CI/sync-to-downstream_3.x/5216 triggered |
What does this PR do?
Decode spaces in factory url
What issues does this PR fix or reference?
eclipse-che/che#22458
Is it tested? How?
N/A
Release Notes
N/A
Docs PR