godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.97k stars 20.18k forks source link

AssetLib can't download archives from GitHub Release (error 403) #6434

Closed akien-mga closed 7 years ago

akien-mga commented 8 years ago

Operating system or device - Godot version: Any OS, current master branch.

Issue description (what happened, and what was expected): When trying to download an asset hosted using GitHub Release (e.g. https://github.com/Geequlim/godot-themes/releases/download/0.1.0/arc_dark_v0.1.0.zip), the download fails with error 403. Because of this, many users are actually uploading their zips to third party websites or versioning them inside their git repo instead of using the more appropriate GH Release, so we should fix that.

Log from a failed attempt:

1 url: https://github.com/Geequlim/godot-themes/releases/download/0.1.0/arc_dark_v0.1.0.zip
yes SSL
2 url: github.com/Geequlim/godot-themes/releases/download/0.1.0/arc_dark_v0.1.0.zip
request string: /Geequlim/godot-themes/releases/download/0.1.0/arc_dark_v0.1.0.zip
3 url: github.com
4 url: github.com
Requesting:
        URL: github.com
        String: /Geequlim/godot-themes/releases/download/0.1.0/arc_dark_v0.1.0.zip
        Port: 443
        SSL: 1
        Validate SSL: 1
CERT STR: /businessCategory=Private Organization/jurisdictionC=US/jurisdictionST=Delaware/serialNumber=5157550/street=88 Colin P Kelly, Jr Street/postalCode=94107/C=US/ST=California/L=San Francisco/O=GitHub, Inc./CN=github.com
VALID: 1
CONNECTION RESULT: 1
cert_ok: 1
HEADER: Server: GitHub.com
HEADER: Date: Thu, 08 Sep 2016 16:59:43 GMT
HEADER: Content-Type: text/html; charset=utf-8
HEADER: Transfer-Encoding: chunked
HEADER: Status: 302 Found
HEADER: Cache-Control: no-cache
HEADER: Vary: X-PJAX
HEADER: Location: https://github-cloud.s3.amazonaws.com/releases/61309568/6be08120-75e6-11e6-8bdd-0b261fa076f1.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160908%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160908T165943Z&X-Amz-Expires=300&X-Amz-Signature=4fa0faa7a5881289581f912406188de7d6bc9558175e8f731e8698a0ee1a0215&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Darc_dark_v0.1.0.zip&response-content-type=application%2Foctet-stream
HEADER: X-UA-Compatible: IE=Edge,chrome=1
HEADER: Set-Cookie: logged_in=no; domain=.github.com; path=/; expires=Mon, 08 Sep 2036 16:59:43 -0000; secure; HttpOnly
HEADER: Set-Cookie: _gh_sess=eyJzZXNzaW9uX2lkIjoiMTQ4YThkNjRhZTVlNzZmZjIxYTYyNzJmMjBiNTY4ZWIiLCJzcHlfcmVwbyI6IkdlZXF1bGltL2dvZG90LXRoZW1lcyIsInNweV9yZXBvX2F0IjoxNDczMzUzOTgzfQ%3D%3D--18e3fbc277ce32c0bf1fa55873ea2d030d3074c3; path=/; secure; HttpOnly
HEADER: X-Request-Id: a74d5fa25a672d9714ab69016e0fe97b
HEADER: X-Runtime: 0.027176
HEADER: Content-Security-Policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; child-src render.githubusercontent.com; connect-src 'self' uploads.github.com status.github.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com wss://live.github.com; font-src assets-cdn.github.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src 'self' data: assets-cdn.github.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; media-src 'none'; object-src assets-cdn.github.com; plugin-types application/x-shockwave-flash; script-src assets-cdn.github.com; style-src 'unsafe-inline' assets-cdn.github.com
HEADER: Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
HEADER: Public-Key-Pins: max-age=5184000; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
HEADER: X-Content-Type-Options: nosniff
HEADER: X-Frame-Options: deny
HEADER: X-XSS-Protection: 1; mode=block
HEADER: Vary: Accept-Encoding
HEADER: X-Served-By: b9c2a2d2339d471239b174dbbc6d8be2
HEADER: X-GitHub-Request-Id: 4DBA18CC:64EC:120D226:57D198FF
NEW LOCATION: https://github-cloud.s3.amazonaws.com/releases/61309568/6be08120-75e6-11e6-8bdd-0b261fa076f1.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160908%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160908T165943Z&X-Amz-Expires=300&X-Amz-Signature=4fa0faa7a5881289581f912406188de7d6bc9558175e8f731e8698a0ee1a0215&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Darc_dark_v0.1.0.zip&response-content-type=application%2Foctet-stream
1 url: https://github-cloud.s3.amazonaws.com/releases/61309568/6be08120-75e6-11e6-8bdd-0b261fa076f1.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160908%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160908T165943Z&X-Amz-Expires=300&X-Amz-Signature=4fa0faa7a5881289581f912406188de7d6bc9558175e8f731e8698a0ee1a0215&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Darc_dark_v0.1.0.zip&response-content-type=application%2Foctet-stream
yes SSL
2 url: github-cloud.s3.amazonaws.com/releases/61309568/6be08120-75e6-11e6-8bdd-0b261fa076f1.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160908%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160908T165943Z&X-Amz-Expires=300&X-Amz-Signature=4fa0faa7a5881289581f912406188de7d6bc9558175e8f731e8698a0ee1a0215&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Darc_dark_v0.1.0.zip&response-content-type=application%2Foctet-stream
request string: /releases/61309568/6be08120-75e6-11e6-8bdd-0b261fa076f1.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160908%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160908T165943Z&X-Amz-Expires=300&X-Amz-Signature=4fa0faa7a5881289581f912406188de7d6bc9558175e8f731e8698a0ee1a0215&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Darc_dark_v0.1.0.zip&response-content-type=application%2Foctet-stream
3 url: github-cloud.s3.amazonaws.com
4 url: github-cloud.s3.amazonaws.com
Requesting:
        URL: github-cloud.s3.amazonaws.com
        String: /releases/61309568/6be08120-75e6-11e6-8bdd-0b261fa076f1.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160908%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160908T165943Z&X-Amz-Expires=300&X-Amz-Signature=4fa0faa7a5881289581f912406188de7d6bc9558175e8f731e8698a0ee1a0215&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Darc_dark_v0.1.0.zip&response-content-type=application%2Foctet-stream
        Port: 443
        SSL: 1
        Validate SSL: 1
new connection: 0
CERT STR: /C=US/ST=Washington/L=Seattle/O=Amazon.com Inc./CN=*.s3.amazonaws.com
VALID: 1
CONNECTION RESULT: 1
cert_ok: 1
HEADER: x-amz-request-id: 5A95FB783A4E720F
HEADER: x-amz-id-2: XNzKmbJEywy5aRVCpjoxmqT50StAyo+6XGr+Z9TpeozRItaxaGSFny00walF5thIKR55BJhNH3A=
HEADER: Content-Type: application/xml
HEADER: Transfer-Encoding: chunked
HEADER: Date: Thu, 08 Sep 2016 16:59:44 GMT
HEADER: Server: AmazonS3
COMPLETED: 0 code: 403 data size: 0

Steps to reproduce:

  1. Activate the Testing repo in the assetlib
  2. Try to download the "Arc Dark theme" asset (category Misc)
akien-mga commented 8 years ago

For comparison, here is the output when downloading the same archive with wget:

wget https://github.com/Geequlim/godot-themes/releases/download/0.1.0/arc_dark_v0.1.0.zip
--2016-09-08 19:24:41--  https://github.com/Geequlim/godot-themes/releases/download/0.1.0/arc_dark_v0.1.0.zip
Resolving github.com (github.com)... 192.30.253.113
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/61309568/6be08120-75e6-11e6-8bdd-0b261fa076f1.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160908%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160908T172442Z&X-Amz-Expires=300&X-Amz-Signature=d28e620617e2f2d0f06876d0a452ad4d82d573af76c23c9fecd3d59d85befea7&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Darc_dark_v0.1.0.zip&response-content-type=application%2Foctet-stream [following]
--2016-09-08 19:24:42--  https://github-cloud.s3.amazonaws.com/releases/61309568/6be08120-75e6-11e6-8bdd-0b261fa076f1.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160908%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160908T172442Z&X-Amz-Expires=300&X-Amz-Signature=d28e620617e2f2d0f06876d0a452ad4d82d573af76c23c9fecd3d59d85befea7&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Darc_dark_v0.1.0.zip&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)... 52.216.64.120
Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|52.216.64.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1810677 (1.7M) [application/octet-stream]
Saving to: 'arc_dark_v0.1.0.zip'

arc_dark_v0.1.0.zip                             100%[====================================================================================================>]   1.73M  1.03MB/s    in 1.7s    

2016-09-08 19:24:44 (1.03 MB/s) - 'arc_dark_v0.1.0.zip' saved [1810677/1810677]
akien-mga commented 7 years ago

I think it's fixed by now.