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

Encode the URL before fetching it. #7934

Merged
merged 1 commit into from Sep 18, 2020

Conversation

francois2metz
Copy link
Contributor

If the URL we were fetching via the proxy had utf-8 characters, the proxy returned a 500 "Request path contains unescaped characters".

Before fetching the URL, we now encode it.

I added a few tests (the utf-8 characters one is failing on master, as expected). I used strapi.io as the proxied url, not really happy about it as it relies on an external service. If you have a better idea, tell me.

Signed-off-by: François de Metz <francois@2metz.fr>
@codecov
Copy link

codecov bot commented Sep 17, 2020

Codecov Report

Merging #7934 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7934   +/-   ##
=======================================
  Coverage   32.71%   32.71%           
=======================================
  Files        1194     1194           
  Lines       12965    12965           
  Branches     1279     1279           
=======================================
  Hits         4241     4241           
  Misses       7884     7884           
  Partials      840      840           
Flag Coverage Δ
#front 24.81% <ø> (ø)
#unit 53.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...min/admin/src/containers/ProfilePage/utils/form.js 100.00% <ø> (ø)
.../admin/src/containers/Users/EditPage/utils/form.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2578a2...d530d36. Read the comment docs.

@alexandrebodin alexandrebodin added this to the 3.2.0 milestone Sep 18, 2020
@alexandrebodin alexandrebodin added source: core:upload Source is core/upload package issue: enhancement Issue suggesting an enhancement to an existing feature labels Sep 18, 2020
Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

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

LGTM

@alexandrebodin
Copy link
Member

Thanks for this PR 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: enhancement Issue suggesting an enhancement to an existing feature source: core:upload Source is core/upload package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants