-
Notifications
You must be signed in to change notification settings - Fork 87
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: resolve & in url upon redirect, shift prefill to textfield component #569
Conversation
2a71f09
to
75b36c1
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.
some comments on the tests!
src/app/controllers/__tests__/frontend.server.controller.spec.ts
Outdated
Show resolved
Hide resolved
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.
to address @mantariksh 's comments before approval
d520e43
to
9694d45
Compare
@mantariksh thanks for the comments, edits for your re-review :) |
src/app/controllers/__tests__/frontend.server.controller.spec.ts
Outdated
Show resolved
Hide resolved
42c546f
to
9aa4446
Compare
@liangyuanruo @mantariksh please review before next release :) |
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.
a couple of nits:
- logger
meta.action
has been standardised to the calling function so it's easier to understand logs - we always
return res.status(...).json(...)
to prevent mistakes in the future where code is written afterres.send
.
otherwise lgtm!
7a03d6b
to
653be9a
Compare
Problem
&
being html-encoded as&
upon redirect, which is not valid URISolution
&
with&
in the ejs template. This was preferred to allowing all characters to be escaped, which may possibly introduce a security vulnerabilityBefore & After
The following non-hashbang URL will be redirected as follows:
https://form.gov.sg/<formId>?<fieldId1>=abc&<fieldId2>=xyz
BEFORE:
https://form.gov.sg/#!/<formId>?<fieldId1>=abc&<fieldId2>=xyz
AFTER:
https://form.gov.sg/#!/<formId>?<fieldId1>=abc&<fieldId2>=xyz
Tests
&
to separate the query params instead of&
Deploy Notes
dependencies