From 5cb1b9c1e94a19f7567d8531725ff09a3297d676 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sat, 12 Oct 2024 12:53:26 +0200 Subject: [PATCH] Web: add CheckRedirect to pages using baselogin.html Signed-off-by: Nicola Murino --- internal/httpd/web.go | 39 ++++++++++++++++++++------------------ internal/httpd/webadmin.go | 1 + 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/internal/httpd/web.go b/internal/httpd/web.go index d4bc68f5..35b2cd7b 100644 --- a/internal/httpd/web.go +++ b/internal/httpd/web.go @@ -73,32 +73,35 @@ type loginPage struct { type twoFactorPage struct { commonBasePage - CurrentURL string - Error *util.I18nError - CSRFToken string - RecoveryURL string - Title string - Branding UIBranding + CurrentURL string + Error *util.I18nError + CSRFToken string + RecoveryURL string + Title string + Branding UIBranding + CheckRedirect bool } type forgotPwdPage struct { commonBasePage - CurrentURL string - Error *util.I18nError - CSRFToken string - LoginURL string - Title string - Branding UIBranding + CurrentURL string + Error *util.I18nError + CSRFToken string + LoginURL string + Title string + Branding UIBranding + CheckRedirect bool } type resetPwdPage struct { commonBasePage - CurrentURL string - Error *util.I18nError - CSRFToken string - LoginURL string - Title string - Branding UIBranding + CurrentURL string + Error *util.I18nError + CSRFToken string + LoginURL string + Title string + Branding UIBranding + CheckRedirect bool } func getSliceFromDelimitedValues(values, delimiter string) []string { diff --git a/internal/httpd/webadmin.go b/internal/httpd/webadmin.go index 9d367f20..c71e1f5e 100644 --- a/internal/httpd/webadmin.go +++ b/internal/httpd/webadmin.go @@ -263,6 +263,7 @@ type setupPage struct { HideSupportLink bool Title string Branding UIBranding + CheckRedirect bool } type folderPage struct {