increpare / increpare/PuzzleScript
ALL puzzles on puzzlescript.net are broken due to missing auth token for github
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 185
- PR merge metrics
- No merged PRs in 30d
Description
It looks like github changed their gist api such that it now requires an auth token to fetch from a public repo. All puzzles on https://www.puzzlescript.net/Gallery/index.html give a 401:
This fails at least as early as the request to:
https://api.github.com/gists/cfdcc6e23f1fb3e9de2fd42fafaf4d4c
For example curling the gist for enigmash fails without adding -H "Authorization: Bearer [Personal Github Token]"
curl -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/gists/cfdcc6e23f1fb3e9de2fd42fafaf4d4c
{
"message": "Requires authentication",
"documentation_url": "https://docs.github.com/rest",
"status": "401"
}
Adding the following line to the website source for githubHTTPClient fixed it:
var githubURL = 'https://api.github.com/gists/'+id;
var githubHTTPClient = new XMLHttpRequest();
githubHTTPClient.open('GET', githubURL);
>> githubHTTPClient.setRequestHeader('Authorization','Bearer ' + 'github_pat_XXXXXXXXXXXXXXXX');
This fix seems incomplete on its own, working for some games not others. The others are breaking in subtle ways that requires an expert's eye.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the website source's githubHTTPClient and reproduce the failing gist request for the Gallery puzzles, including the 401 response. The work is done when all puzzles on the Gallery load successfully without authentication failures or the reported subtle breakages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100