fix(17): T-17-15 refuse an unsafe frontend_url on save and import

- Settings.BeforeValidate answers a cabana validation error on
  frontend_url, so the settings save is a 422 and the row is unchanged
- sitemap:import-winter stops on a frontend_url that
  models.AllowedFrontendURL refuses, before the dry-run branch and before
  any database use; the value is printed quoted
- errors.frontend_url phrase in en and pl
- TestSettingsBeforeValidate, TestWinterSettingsFrontendURL and the save
  and import refusals in the Postgres smokes
This commit is contained in:
Jakub Zych
2026-10-13 00:59:24 +02:00
parent b9804ddf17
commit 1bb89ce006
9 changed files with 204 additions and 8 deletions

View File

@@ -40,6 +40,7 @@ item:
errors:
url_scheme: Use a path such as /about, or a link that starts with http:// or https://.
url_pattern: Use a path that starts with a single /, for example /blog/:slug.
frontend_url: 'Use a full address that starts with http:// or https://, without spaces, quotes or the characters < > &. Leave it empty to keep the backend URL.'
definition:
not_found: No sitemap definition was found. Try creating one first.
title: Sitemap definition

View File

@@ -40,6 +40,7 @@ item:
errors:
url_scheme: Podaj ścieżkę, np. /o-nas, albo link zaczynający się od http:// lub https://.
url_pattern: Podaj ścieżkę zaczynającą się od jednego /, np. /blog/:slug.
frontend_url: 'Podaj pełny adres zaczynający się od http:// lub https://, bez spacji, cudzysłowów i znaków < > &. Zostaw puste, aby zachować adres backendu.'
definition:
not_found: Nie znaleziono definicji mapy strony. Musisz ją utworzyć.
title: Definicja mapy strony