diff --git a/build/Filters/Links.hs b/build/Filters/Links.hs index 574fb4f..4dff099 100644 --- a/build/Filters/Links.hs +++ b/build/Filters/Links.hs @@ -76,18 +76,21 @@ isInternalPage url | "https://" `T.isPrefixOf` url = False | otherwise = True --- | True if the URL points outside the site's domain. +-- | True if the URL points outside the site's content host. -- --- Uses a strict hostname comparison rather than substring matching, so --- that a hostile lookalike like @evil-levineuwirth.org.attacker.com@ is --- correctly classified as external (and gets @rel=noopener noreferrer@ --- plus @target=_blank@ applied). +-- Only @levineuwirth.org@ and @www.levineuwirth.org@ count as the content +-- site itself. Sibling subdomains like @git.levineuwirth.org@ (Forgejo) are +-- distinct services and are classified as external so they receive their +-- brand icon, @target=_blank@, and @rel=noopener noreferrer@. +-- +-- Uses strict hostname comparison rather than substring matching, so a +-- hostile lookalike like @evil-levineuwirth.org.attacker.com@ is also +-- correctly classified as external. isExternal :: Text -> Bool isExternal url = case extractHost url of Nothing -> False - Just host -> - not (host == siteHost || ("." <> siteHost) `T.isSuffixOf` host) + Just host -> host /= siteHost && host /= "www." <> siteHost where siteHost = "levineuwirth.org" diff --git a/static/favicon-96x96.png b/static/favicon-96x96.png index 1803230..9e9d866 100644 Binary files a/static/favicon-96x96.png and b/static/favicon-96x96.png differ diff --git a/static/favicon.ico b/static/favicon.ico index 8472325..9f26a50 100644 Binary files a/static/favicon.ico and b/static/favicon.ico differ diff --git a/static/favicon.svg b/static/favicon.svg index 61d639c..78c8c19 100644 --- a/static/favicon.svg +++ b/static/favicon.svg @@ -1 +1 @@ -RealFaviconGeneratorhttps://realfavicongenerator.net \ No newline at end of file +RealFaviconGeneratorhttps://realfavicongenerator.net \ No newline at end of file