Commit Graph
6 Commits
Author SHA1 Message Date
Dylan M. Taylor 9c144f5bf3 worker: drop duplicate permission keys and the trailing-= regex (SonarCloud S1534, S8786) (#36)
- `/repos/{repo}` permissions: `push` and `pull` were set twice; the later `true`, after the spread, already won. The earlier pair is removed (javascript:S1534). Same object.
- `base64url`: `.replace(/=/g, '')` in place of `.replace(/=+$/, '')` (javascript:S8786). Base64 only uses `=` as end padding, so the result is the same.
2026-11-10 18:45:25 -05:00
Dylan M. Taylor e1fd5e325f Grant write permissions in repo response for editor sessions 2026-11-08 20:49:58 -05:00
Dylan M. Taylor e90f32766b Authenticate editor commits using Craft Wiki GitHub App 2026-11-08 20:45:13 -05:00
Dylan M. Taylor eff49c56fe Harden the sign-in page and check Safe Browsing status
Chrome warns because Safe Browsing lists some craft.wiki pages as phishing, and
the Worker's sign-in page was a bare "Craft Wiki sign-in" title served from an
/api/ path with no branding, no explanation and no security headers. Give it the
wiki's branding, say that the password prompt belongs to discord.com, and send a
CSP with framing, referrer and content-type headers.

Add a script and a daily workflow that report Google's verdict for the domain,
so a listing is noticed without waiting for a browser to show it.
2026-11-06 18:31:29 -05:00
FredAppsandClaude Opus 5.5 49481ddecc Finish Discord sign-in when the callback has no opener
Save the session where Sveltia looks for it and open the editor when no editor window answers, and show text instead of a blank page. Run the Worker test file directly, because the directory form ran no tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 23:32:02 +01:00
FredAppsandClaude Opus 5.5 64b3c3b7c6 Let Senior Contributors edit the wiki with Discord sign-in
Add a Worker that signs editors in with Discord, checks the Senior Contributor role, and serves the editor's GitHub API with a server-side token limited to wiki content. GitHub tokens pass through unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 21:41:07 +01:00