Page MenuHomePhabricator

01-T347726-rev2.patch

Authored By
sbassett
Oct 3 2023, 2:44 PM
Size
993 B
Referenced Files
None
Subscribers
None

01-T347726-rev2.patch

From 48e151fa5aa3ef9cdd95851b5e8fe35b734796db Mon Sep 17 00:00:00 2001
From: Brian Wolff <bawolff+wn@gmail.com>
Date: Tue, 3 Oct 2023 09:36:51 -0500
Subject: [PATCH] SECURITY: Ensure group name is escaped in user rights log
This fixes issue where group-*-member messages are output with
incorrect escaping.
Bug: T34772
---
includes/logging/RightsLogFormatter.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/includes/logging/RightsLogFormatter.php b/includes/logging/RightsLogFormatter.php
index 95f9a24fb96..45893dca4d9 100644
--- a/includes/logging/RightsLogFormatter.php
+++ b/includes/logging/RightsLogFormatter.php
@@ -146,7 +146,7 @@ class RightsLogFormatter extends LogFormatter {
$expiryFormatted, $expiryFormattedD, $expiryFormattedT )->parse();
} else {
// the right does not expire; just insert the group name
- $permList[] = $group;
+ $permList[] = htmlspecialchars( $group );
}
next( $groups );
--
2.39.3 (Apple Git-145)

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11577845
Default Alt Text
01-T347726-rev2.patch (993 B)

Event Timeline