diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/ID3/module.tag.id3v2.php --- a/wp/wp-includes/ID3/module.tag.id3v2.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-includes/ID3/module.tag.id3v2.php Fri Sep 05 18:40:08 2025 +0200 @@ -1494,7 +1494,7 @@ unset($comments_picture_data); } } - } while (false); + } while (false); // @phpstan-ignore-line } } elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'GEOB')) || // 4.15 GEOB General encapsulated object @@ -2064,7 +2064,7 @@ $parsedFrame['subframes'][] = $subframe; break; case 'WXXX': - list($subframe['chapter_url_description'], $subframe['chapter_url']) = explode("\x00", $encoding_converted_text, 2); + @list($subframe['chapter_url_description'], $subframe['chapter_url']) = explode("\x00", $encoding_converted_text, 2); $parsedFrame['chapter_url'][$subframe['chapter_url_description']] = $subframe['chapter_url']; $parsedFrame['subframes'][] = $subframe; break; @@ -3753,18 +3753,12 @@ * @return bool */ public static function IsANumber($numberstring, $allowdecimal=false, $allownegative=false) { - for ($i = 0; $i < strlen($numberstring); $i++) { - if ((chr($numberstring[$i]) < chr('0')) || (chr($numberstring[$i]) > chr('9'))) { - if (($numberstring[$i] == '.') && $allowdecimal) { - // allowed - } elseif (($numberstring[$i] == '-') && $allownegative && ($i == 0)) { - // allowed - } else { - return false; - } - } - } - return true; + $pattern = '#^'; + $pattern .= ($allownegative ? '\\-?' : ''); + $pattern .= '[0-9]+'; + $pattern .= ($allowdecimal ? '(\\.[0-9]+)?' : ''); + $pattern .= '$#'; + return preg_match($pattern, $numberstring); } /** @@ -3773,10 +3767,7 @@ * @return bool */ public static function IsValidDateStampString($datestamp) { - if (strlen($datestamp) != 8) { - return false; - } - if (!self::IsANumber($datestamp, false)) { + if (!preg_match('#^[12][0-9]{3}[01][0-9][0123][0-9]$#', $datestamp)) { return false; } $year = substr($datestamp, 0, 4);