diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 00754c5370..984123e0fd 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -121,6 +121,7 @@
[Fix] Correctly get unread status information for global announcements in search results.
[Fix] Correctly handle global announcements in ATOM feeds.
[Fix] Use correct limit config parameter in the News feed.
+ [Fix] Restrict search for styles/../style.cfg to folders. (Bug #55665)
[Change] Move redirect into a hidden field to avoid issues with mod_security. (Bug #54145)
[Change] Log activation through inactive users ACP. (Bug #30145)
[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index fbf3eadcb2..faa16570c5 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -643,6 +643,10 @@ parse_css_file = {PARSE_CSS_FILE}
{
while (($file = readdir($dp)) !== false)
{
+ if (!is_dir($file))
+ {
+ continue;
+ }
$subpath = ($mode != 'style') ? "$mode/" : '';
if ($file[0] != '.' && file_exists("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
{