From b7eaee4977b02f610ac01d0b2d4f733f3b82e8d1 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 9 Apr 2021 10:55:50 -0500 Subject: [PATCH] don't load plugins whose filename start with a . --- phpseclib/Crypt/Common/AsymmetricKey.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpseclib/Crypt/Common/AsymmetricKey.php b/phpseclib/Crypt/Common/AsymmetricKey.php index b78c9d5c..7fa451c7 100644 --- a/phpseclib/Crypt/Common/AsymmetricKey.php +++ b/phpseclib/Crypt/Common/AsymmetricKey.php @@ -351,6 +351,9 @@ abstract class AsymmetricKey continue; } $name = $file->getBasename('.php'); + if ($name[0] == '.') { + continue; + } $type = 'phpseclib3\Crypt\\' . static::ALGORITHM . '\\Formats\\' . $format . '\\' . $name; $reflect = new \ReflectionClass($type); if ($reflect->isTrait()) {