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.
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:
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.