We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d066a0d commit 60bd350Copy full SHA for 60bd350
1 file changed
wp-cache-phase2.php
@@ -1089,6 +1089,11 @@ function supercache_filename() {
1089
if ( is_array( $cached_direct_pages ) && in_array( $_SERVER['REQUEST_URI'], $cached_direct_pages ) ) {
1090
$extra_str = '';
1091
}
1092
+
1093
+ // The filename must always be a single path segment. Filters above may
1094
+ // return arbitrary data, so restrict it to a safe set of characters.
1095
+ $extra_str = preg_replace( '/[^a-zA-Z0-9_-]/', '', (string) $extra_str );
1096
1097
$filename = 'index' . $extra_str . '.html';
1098
1099
return $filename;
0 commit comments