Skip to content
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 base64 bug #412

Merged
merged 2 commits into from Jul 13, 2018
Merged

fix base64 bug #412

merged 2 commits into from Jul 13, 2018

Conversation

mashihua
Copy link
Contributor

The Base64 table has Char '+' https://en.wikipedia.org/wiki/Base64, it will turn to blank characters in url request, It will cause some error when deserializeState the state.

Description

The Base64 table has Char '+' [https://en.wikipedia.org/wiki/Base64](https://en.wikipedia.org/wiki/Base64), it will turn to blank characters in url request, It will cause some error when  deserializeState the state.
@mfix22
Copy link
Contributor

mfix22 commented Jun 27, 2018

Hey @mashihua thanks for the PR!

@@ -9,7 +9,7 @@ module.exports = browser => async (req, res) => {
if (!state) res.status(400).send()

try {
await page.goto(`http://localhost:${PORT}?state=${state}`)
await page.goto(`http://localhost:${PORT}?state=${encodeURIComponent(state)}`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be handling this properly in the serialize/deserialize functions rather than inline on the handler

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mashihua can you move encodeURIComponent into the function @briandennis mentioned above? (:

@mfix22 mfix22 closed this Jun 27, 2018
@mfix22 mfix22 reopened this Jun 27, 2018
@mfix22 mfix22 merged commit b137150 into carbon-app:master Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants