Skip to content

fix: correct OAuth2 URL, harden auth, thread context, tighten perms#1

Merged
sofq merged 1 commit intomasterfrom
fix/code-review-issues
Mar 28, 2026
Merged

fix: correct OAuth2 URL, harden auth, thread context, tighten perms#1
sofq merged 1 commit intomasterfrom
fix/code-review-issues

Conversation

@sofq
Copy link
Copy Markdown
Owner

@sofq sofq commented Mar 28, 2026

Summary

  • Critical: Fix OAuth2 base URL from /wiki/rest/api/v2 (invalid, all API calls 404) to /wiki/api/v2
  • Validate OAuth2 callback code parameter before showing "Authorization successful!"
  • Thread context.Context through FetchUserPages for proper cancellation/timeout support
  • Change template file permissions from 0644 to 0600 (consistent with rest of codebase)
  • Add io.LimitReader (10 MiB cap) to search response body reads to prevent memory exhaustion

Test plan

  • go test ./... — all tests pass
  • go vet ./... — clean
  • go build ./... — builds successfully

…tighten permissions

- Fix OAuth2 base URL from /wiki/rest/api/v2 (invalid) to /wiki/api/v2
- Validate OAuth2 callback code parameter before reporting success
- Thread context.Context through FetchUserPages for cancellation support
- Change template file permissions from 0644 to 0600 (consistent with codebase)
- Add io.LimitReader to search response body reads (10 MiB cap)
@sofq sofq merged commit fbc4b69 into master Mar 28, 2026
4 checks passed
@sofq sofq deleted the fix/code-review-issues branch March 29, 2026 11:37
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.

1 participant