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

Revert "API uploads images via URL" (#3573) #3622

Merged
merged 1 commit into from
May 15, 2020

Conversation

kennyadsl
Copy link
Member

Description

This reverts PR #3573.

This commit potentially introduces a security vulnerability, (CVE-2017–0889) as described here, as kindly reported and described by this PR author in #3593.

Also, this PR has been introduced because there wasn't a clear way to upload images via API, but this can be done by setting the right Content-Type header in the request, as follow:

curl -v -H "Content-Type: multipart/form-data" -H "Authorization: Bearer YOUR_TOKEN" http://your.host/api/products/1

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

@kennyadsl kennyadsl self-assigned this May 13, 2020
This reverts commit 4a1824a.

This commit potentially introduces a security vulnerabilty,
(CVE-2017–0889) as described here:

https://medium.com/in-the-weeds/all-about-paperclips-cve-2017-0889-server-side-request-forgery-ssrf-vulnerability-8cb2b1c96fe8

as kindly reported and described by this PR author in solidusio#3593.

Also, this PR has been introduced because there wasn't a clear way to
upload images via API, but this can be done by setting the right
Content-Type header in the request, as follow:

curl -v -H "Content-Type: multipart/form-data" -H "Authorization: Bearer YOUR_TOKEN" http://your.host/api/products/1
@kennyadsl kennyadsl force-pushed the kennyadsl/revert-3573 branch from af0a1a2 to 97cac91 Compare May 13, 2020 16:02
@kennyadsl kennyadsl merged commit 83ea392 into solidusio:master May 15, 2020
@kennyadsl kennyadsl deleted the kennyadsl/revert-3573 branch May 15, 2020 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_api Changes to the solidus_api gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants