From e02c8452d41f643c5d6208078f45f4b0cb6335b7 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 3 Apr 2021 15:54:27 -0500 Subject: [PATCH] ASN1: fail when encountering unsupported tags --- phpseclib/File/ASN1.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 2424d341..1419c097 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -578,7 +578,9 @@ class File_ASN1 $current['content'] = class_exists('DateTime') ? $this->_decodeDateTime(substr($content, $content_pos), $tag) : $this->_decodeUnixTime(substr($content, $content_pos), $tag); + break; default: + return false; } $start+= $length;