Repository navigation
Make footer support link configurable - #341
Merged
Merged
Conversation
The "Report a Bug" footer link pointed at a hardcoded, non-existent route (https://adr.unaids.org/bug) that 404'd. Replace it with a support URL read from the CKAN_UNAIDS_SUPPORT_URL env var, falling back to the ckanext.unaids.support_url config key. The helper only exposes an absolute https:// URL; any other value (http, javascript:, data:, relative, unset) is dropped and the link is hidden rather than rendered dead. Also fixes the stray ")" markup typo and corrects target="blank" to target="_blank" with rel="noopener".
A-Souhei
force-pushed
the
configurable-support-url
branch
from
July 10, 2026 17:05
db2a4ce to
9abd092
Compare
Require an https scheme with a non-empty host (via urlsplit) instead of a prefix check, so hostless values like "https://" or "https:///path" are rejected rather than rendered as dead links. Add tests for the config fallback, env-over-config precedence, unset, uppercase scheme, protocol-relative and malformed-https cases.
ChasNelson1990
approved these changes
Jul 10, 2026
ChasNelson1990
left a comment
Member
There was a problem hiding this comment.
LGTM. Obviously @A-Souhei there will need to be a PR to the adx repo to add the config varilable (@cooper667 flagging this)
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.
What
The "Report a Bug" link in the site footer pointed at a hardcoded, non-existent route (
https://adr.unaids.org/bug) which 404'd — leaving live users with no working way to reach support.This makes the link configurable and drops it in cleanly:
get_support_url()helper readsCKAN_UNAIDS_SUPPORT_URL(env) →ckanext.unaids.support_url(config), mirroring the existingget_google_analytics_id()pattern.https://URL is configured — otherwise it's hidden (no dead link).")"markup typo and correctstarget="blank"→target="_blank"withrel="noopener".Security
get_support_url()validates the scheme: only absolutehttps://values are exposed.http://,javascript:,data:, relative, and unset values all returnNone(link hidden), preventing scheme-injection into the footerhref. Covered by a parametrized unit test.Config
Set one of:
CKAN_UNAIDS_SUPPORT_URL=https://<subdomain>.freshdesk.com/support/tickets/newckanext.unaids.support_url = https://...Notes
adx_developdocker-compose.yml+ submodule bump) is handled separately in the parent repo.