feat: redirect non-subscribers to signup page (fixes #168)#171
Merged
hokiepokedad2 merged 2 commits intoApr 12, 2026
Conversation
… strings (#168) Add admin-configurable signup_url site setting that displays a "Sign Up" button on the login page for non-registered users. The signup URL is served via the public settings endpoint (no auth required) and never passed through URL fragments to prevent open-redirect attacks. Also extracts ~45 hardcoded English strings across the frontend into i18n translation keys covering auth errors, error interceptor toasts, test alert messages, admin settings, fort changes, max battles, and template selector condition labels.
Contributor
Author
Code Review: APPROVEDExecutive Summary
CI Checks — All Passing
What This PR Does
Security Review
Issues Found: 0No critical, major, or minor issues identified. Test Coverage
Risk: Low
|
hokiepokedad2
added a commit
that referenced
this pull request
Apr 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
signup_urlsite setting (Settings > Analytics & Links) that displays a green "Sign Up" button on the login page for non-registered usersGET /api/settings/publicendpoint — never passed through URL fragments to prevent open-redirect phishing attacksSignup redirect feature
signup_urltoSiteSettingService.PublicKeyswhitelistperson_addicon whensignup_urlis configured — visible both on clean login and after auth errors (user_not_registered, missing_required_role)i18n extraction
AUTH.ERR_*keysERROR.*keysTEST_ALERT.*keysADMIN_SETTINGS.*keysFORT_CHANGES.*keysMAX_BATTLES.*keysTEMPLATE.COND_*keysTests
GetPublicAsyncIncludesSignupUrlSettingtest)Fixes #168
Test plan
signup_urlin admin Settings > Analytics & Links, verify green "Sign Up" button appears on login pagesignup_url, verify button disappears/login#error=user_not_registeredwith signup URL configured — verify error message + signup button both show/login#signup_url=https://evil.com— verify button does NOT appear (uses settings only)dotnet testandnpm test— all pass