From d7bbfcb3fda6e46771feaadb1cb828f447bb0f03 Mon Sep 17 00:00:00 2001
From: hokiepokedad2 <38219945+hokiepokedad2@users.noreply.github.com>
Date: Wed, 5 Aug 2026 09:53:24 -0400
Subject: [PATCH] security: stop gym-picker images leaking a Referer to
third-party hosts (#242)
The gym picker renders two kinds of remote image: the scanner DB's
gym.url photo, and the team-icon fallback served from
raw.githubusercontent.com. Neither carried a referrer policy, so every
image request told the remote host which PoracleWeb instance the user
was browsing.
All four tags now set referrerpolicy="no-referrer". Browsers
already default to strict-origin-when-cross-origin, so the pre-existing
leak was the origin rather than the full URL; this closes the remainder.
Presentation-only. GymSearchResult.Url still carries the raw scanner
URL, and no API, model, or scanner query changed.
The photo-proxy endpoint suggested in #242 is deliberately not
implemented: fetching a URL supplied by a database PoracleWeb does not
own would convert a passive disclosure into an authenticated
outbound-request primitive from a host that can reach Poracle, Koji,
Golbat and both MySQL servers.
Refs #242
---
.../components/gym-picker/gym-picker.component.html | 8 ++++----
CHANGELOG.md | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/shared/components/gym-picker/gym-picker.component.html b/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/shared/components/gym-picker/gym-picker.component.html
index 911b7806..61135ca0 100644
--- a/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/shared/components/gym-picker/gym-picker.component.html
+++ b/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/shared/components/gym-picker/gym-picker.component.html
@@ -1,9 +1,9 @@
@if (selectedGym(); as gym) {