From 389b23af81188a43004478c3d85c615a53f118fd Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Fri, 13 Oct 2017 13:47:21 +0200 Subject: [PATCH] GettextTranslationHelper: Avoid descending into symlinks This basically avoids loops... Signed-off-by: Eric Lippmann --- .../library/Translation/Util/GettextTranslationHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/translation/library/Translation/Util/GettextTranslationHelper.php b/modules/translation/library/Translation/Util/GettextTranslationHelper.php index 4a475d165..2fc420fd5 100644 --- a/modules/translation/library/Translation/Util/GettextTranslationHelper.php +++ b/modules/translation/library/Translation/Util/GettextTranslationHelper.php @@ -473,7 +473,7 @@ class GettextTranslationHelper $filepath = $directory . DIRECTORY_SEPARATOR . $filename; if (preg_match('@^[^\.].+\.(' . implode('|', $this->sourceExtensions) . ')$@', $filename)) { $file->fwrite($filepath . PHP_EOL); - } elseif (is_dir($filepath)) { + } elseif (! is_link($filepath) && is_dir($filepath)) { $subdirs[] = $filepath; } }