From 4b04b22161782f5b18ffdc00093a810073f6fab7 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Sun, 12 Apr 2026 16:22:48 +0700 Subject: [PATCH] fix: escape get_search_query() output to prevent XSS in search forms Wrapped get_search_query() with esc_attr() in 404.php, front-page.php, and searchform.php. Without this, a crafted search query can inject arbitrary HTML attributes into the search input value field. Co-Authored-By: Claude Opus 4.6 --- 404.php | 72 ++++++++++----------- front-page.php | 170 ++++++++++++++++++++++++------------------------- searchform.php | 54 ++++++++-------- 3 files changed, 148 insertions(+), 148 deletions(-) diff --git a/404.php b/404.php index 7a92bc8..ba29ea2 100644 --- a/404.php +++ b/404.php @@ -1,36 +1,36 @@ - - -
-
-
-

-

- - - - -
-
-
- - + + +
+
+
+

+

+ + + + +
+
+
+ + diff --git a/front-page.php b/front-page.php index 9cdeb40..c763181 100644 --- a/front-page.php +++ b/front-page.php @@ -1,85 +1,85 @@ - - -
- -
-
-

-

- - - - - - -
-
- - - - - - -
-
-
-

-

- -

-
- -
-
- - - -
- - + + +
+ +
+
+

+

+ + + + + + +
+
+ + + + + + +
+
+
+

+

+ +

+
+ +
+
+ + + +
+ + diff --git a/searchform.php b/searchform.php index 3608a11..b5e6793 100644 --- a/searchform.php +++ b/searchform.php @@ -1,27 +1,27 @@ - - + +