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

Use raw.githubusercontent.com instead of raw.github.com for binaries #99

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

atma
Copy link
Contributor

@atma atma commented Feb 19, 2019

According to Github to avoid XSS all user-generated content must be accesed from alternative domain: raw.githubusercontent.com.

Current:

curl -I -XGET https://raw.github.com/imagemin/pngquant-bin/v5.0.1/vendor/macos/pngquant
HTTP/1.1 503 Backend unavailable, connection timeout

Updated:

curl -I -XGET https://raw.githubusercontent.com/imagemin/pngquant-bin/v5.0.1/vendor/macos/pngquant
HTTP/1.1 200 OK

UPD: as @cadejscroggins indicated below raw.github.com seems to be working now, but would be nice to be sure that issue will not appear again some day.

According to [Github](https://developer.github.com/changes/2014-04-25-user-content-security/) to avoid XSS all user-generated content must be accesed from alternative domain: `raw.githubusercontent.com`.
@mfb-andy-zz
Copy link

can we please merge this. all of our builds are failing until this is pushed.

@frissekom
Copy link

We are also stuck for now. please merge this request

@joshbeam
Copy link

Please merge 👍

@sueannioanis
Copy link

👍

@avieseegobinsc
Copy link

🆒

Copy link

@colinodell colinodell left a comment

Choose a reason for hiding this comment

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

I can confirm this fixes the issue.

@gabrielerzinger
Copy link

please merge this

@josephmaxim
Copy link

Please merge.

@samwardatanchor
Copy link

:merge_it:

@austinknight
Copy link

Is it merged yet?

No 😑

@nik
Copy link

nik commented Feb 19, 2019

someone for the love of god merge this and unblock me

@fmolina24
Copy link

🙏 merge.

Copy link

@soonwong soonwong left a comment

Choose a reason for hiding this comment

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

MERGE ME MERGE ME MERGE ME

Copy link

@Kyle-Muir Kyle-Muir left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@dylanhotfire
Copy link

Can I get a MERGE ma bro

Copy link

@seanwang-okta seanwang-okta left a comment

Choose a reason for hiding this comment

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

🚢

Copy link

@fmolina24 fmolina24 left a comment

Choose a reason for hiding this comment

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

🚀

@markmssd
Copy link

🆘

Copy link

@michaelkozakovsc michaelkozakovsc left a comment

Choose a reason for hiding this comment

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

image

@colinodell
Copy link

colinodell commented Feb 19, 2019

If you don't have any new information to add please 👍 an existing message instead of adding duplicates or spamming gifs. The fewer messages the maintainers have to read through the faster they'll get a fix released 😉

Copy link

@michaelkozakovsc michaelkozakovsc left a comment

Choose a reason for hiding this comment

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

image

Copy link

@raymondwu1 raymondwu1 left a comment

Choose a reason for hiding this comment

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

This change looks amazing please merge.

@xvvvyz
Copy link

xvvvyz commented Feb 19, 2019

raw.github.com seems to be working now.

Copy link

@shaun-sweet shaun-sweet left a comment

Choose a reason for hiding this comment

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

should this be in a encodeURI() call?

@@ -3,7 +3,7 @@ const path = require('path');
const BinWrapper = require('bin-wrapper');
const pkg = require('../package.json');

const url = `https://raw.github.com/imagemin/pngquant-bin/v${pkg.version}/vendor/`;
const url = `https://raw.githubusercontent.com/imagemin/pngquant-bin/v${pkg.version}/vendor/`;

Choose a reason for hiding this comment

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

should this be in a encodeURI() call?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shaun-sweet encodeURI() has no sense here, it does not encode specials characters like :, . or / that can be found in this URL, please do not confuse with encodeURIComponent(). Please the the corresponding article on MDN.

Choose a reason for hiding this comment

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

Good call!!

@1000ch 1000ch merged commit 0cd3a9e into imagemin:master Feb 20, 2019
@1000ch
Copy link
Member

1000ch commented Feb 20, 2019

Published v5.0.2.

@atma atma deleted the fix/bin-domain branch February 20, 2019 12:39
@destinytaoer
Copy link

In my case, it failed in githubusercontent, but it successed in github.

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