Skip to content

Fix Org.build_host_link null subdomain, https for custom domains, hostname typo - #259

Merged
norkans7 merged 2 commits into
mainfrom
build-host-link-fixes
Jul 27, 2026
Merged

Fix Org.build_host_link null subdomain, https for custom domains, hostname typo#259
norkans7 merged 2 commits into
mainfrom
build-host-link-fixes

Conversation

@norkans7

@norkans7 norkans7 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Org.build_host_link() only handled a blank subdomain, so an org with a NULL subdomain produced links like http://None.example.com — which flow into invitation emails. The custom-domain branch also always returned http:// even on secure deployments (the subdomain branch already switched on SESSION_COOKIE_SECURE), and the hostname fallback had a typo ("locahost").

A None subdomain is now treated like blank, the scheme is computed once and applied to both branches, and the typo is fixed. Tests cover the None-subdomain and secure/insecure custom-domain cases.

Note that the custom-domain scheme change is an intentional reversal of earlier behavior that deliberately served custom-domain links over http (since custom domains might not have TLS configured). Custom-domain links now use https whenever the deployment signals secure cookies via SESSION_COOKIE_SECURE. Operators running a custom domain without TLS termination should not enable SESSION_COOKIE_SECURE, or should set up TLS for their custom domains before upgrading.

@norkans7
norkans7 merged commit 9b010db into main Jul 27, 2026
14 checks passed
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