/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
php-8.4.13
ext/fileinfo/magicdata.patch
213 строк
6 KB
Niels Dossche
Fix GH-17039: PHP 8.4: Incorrect MIME content type
09 дек 2024, 00:47
Не верифицирован
09 дек 2024, 00:47
f1b24da
Код
Авторство
О чём код?
diff -ur Magdir.orig/javascript Magdir/javascript --- Magdir.orig/javascript 2024-12-04 21:21:54.168928738 +0100 +++ Magdir/javascript 2024-12-04 21:21:56.652262003 +0100 @@ -17,37 +17,38 @@ !:mime application/javascript # JavaScript -# The strength is increased to beat the C++ & HTML rules +# The strength is increased to beat the C++ but lose to HTML rules, +# because javascript is embedded in hmtl files typically 0 search "use\x20strict" JavaScript source -!:strength +30 +!:strength +20 !:mime application/javascript !:ext js 0 search 'use\x20strict' JavaScript source -!:strength +30 +!:strength +20 !:mime application/javascript !:ext js 0 regex module(\\.|\\[["'])exports.*= JavaScript source -!:strength +30 +!:strength +20 !:mime application/javascript !:ext js 0 regex \^(const|var|let).*=.*require\\( JavaScript source -!:strength +30 +!:strength +20 !:mime application/javascript !:ext js 0 regex \^export\x20(function|class|default|const|var|let|async)\x20 JavaScript source -!:strength +30 +!:strength +20 !:mime application/javascript !:ext js 0 regex \\((async\x20)?function[(\x20] JavaScript source -!:strength +30 +!:strength +20 !:mime application/javascript !:ext js 0 regex \^(import|export).*\x20from\x20 JavaScript source -!:strength +30 +!:strength +20 !:mime application/javascript !:ext js 0 regex \^(import|export)\x20["']\\./ JavaScript source -!:strength +30 +!:strength +20 !:mime application/javascript !:ext js 0 regex \^require\\(["'] JavaScript source @@ -55,13 +56,13 @@ !:mime application/javascript !:ext js 0 regex typeof.*[!=]== JavaScript source -!:strength +30 +!:strength +20 !:mime application/javascript !:ext js # React Native minified JavaScript 0 search/128 __BUNDLE_START_TIME__= React Native minified JavaScript -!:strength +30 +!:strength +20 !:mime application/javascript !:ext bundle/jsbundle diff -ur Magdir.orig/rpm Magdir/rpm --- Magdir.orig/rpm 2024-12-04 21:21:54.175595405 +0100 +++ Magdir/rpm 2024-12-04 21:21:56.652262003 +0100 @@ -29,6 +29,7 @@ >>8 beshort 17 SuperH >>8 beshort 18 Xtensa >>8 beshort 255 noarch +>>10 string x %s #delta RPM Daniel Novotny (dnovotny@redhat.com) 0 string drpm Delta RPM diff -ur Magdir.orig/securitycerts Magdir/securitycerts --- Magdir.orig/securitycerts 2024-12-04 21:21:54.175595405 +0100 +++ Magdir/securitycerts 2024-12-04 21:21:56.652262003 +0100 @@ -4,3 +4,5 @@ 0 search/1 -----BEGIN\ CERTIFICATE------ RFC1421 Security Certificate text 0 search/1 -----BEGIN\ NEW\ CERTIFICATE RFC1421 Security Certificate Signing Request text 0 belong 0xedfeedfe Sun 'jks' Java Keystore File data + +0 string \0volume_key volume_key escrow packet diff -ur Magdir.orig/sgml Magdir/sgml --- Magdir.orig/sgml 2024-12-04 21:21:54.175595405 +0100 +++ Magdir/sgml 2024-12-04 21:21:56.652262003 +0100 @@ -1,16 +1,17 @@ #------------------------------------------------------------------------------ -# $File: sgml,v 1.48 2023/01/18 16:10:21 christos Exp $ +# $File: sgml,v 1.49 2023/08/05 14:34:47 christos Exp $ # Type: SVG Vectorial Graphics # From: Noel Torres <tecnico@ejerciciosresueltos.com> -0 string \<?xml\ version= +0 string/bt \<?xml\ version= >14 regex ['"\ \t]*[0-9.]+['"\ \t]* >>19 search/4096 \<svg SVG Scalable Vector Graphics image +!:strength +50 !:mime image/svg+xml !:ext svg >>19 search/4096 \<gnc-v2 GnuCash file !:mime application/x-gnucash -0 string \<svg SVG Scalable Vector Graphics image +0 string/bt \<svg SVG Scalable Vector Graphics image !:mime image/svg+xml !:ext svg @@ -53,11 +54,14 @@ # avoid misdetection as JavaScript 0 string/cWt \<!doctype\ html HTML document text !:mime text/html +!:strength + 30 0 string/ct \<html> HTML document text !:mime text/html +!:strength + 30 0 string/ct \<!-- >&0 search/4096/cWt \<!doctype\ html HTML document text !:mime text/html +!:strength + 30 >&0 search/4096/ct \<html> HTML document text !:mime text/html @@ -65,69 +69,61 @@ # https://www.w3.org/TR/SVG/single-page.html 0 search/4096/cWbt \<!doctype\ svg SVG XML document !:mime image/svg+xml -!:strength + 15 +!:strength + 30 0 search/4096/cwt \<head\> HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cWt \<head\ HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cwt \<title\> HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cWt \<title\ HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cwt \<html\> HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cWt \<html\ HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cwt \<script\> HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cWt \<script\ HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cwt \<style\> HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cWt \<style\ HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cwt \<table\> HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cWt \<table\ HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 0 search/4096/cwt \<a\ href= HTML document text !:mime text/html -!:strength + 15 +!:strength + 30 # Extensible markup language (XML), a subset of SGML # from Marc Prud'hommeaux (marc@apocalypse.org) 0 search/1/cwt \<?xml XML document text !:mime text/xml -!:strength + 15 -0 string/t \<?xml\ version\ " XML -!:mime text/xml -!:strength + 15 +!:strength + 30 0 string/t \<?xml\ version=" XML !:mime text/xml -!:strength + 15 ->15 string/t >\0 %.3s document text ->>23 search/1 \<xsl:stylesheet (XSL stylesheet) ->>24 search/1 \<xsl:stylesheet (XSL stylesheet) -0 string/t \<?xml\ version=' XML -!:mime text/xml -!:strength + 15 +!:strength + 30 >15 string/t >\0 %.3s document text >>23 search/1 \<xsl:stylesheet (XSL stylesheet) >>24 search/1 \<xsl:stylesheet (XSL stylesheet) + 0 search/1/wt \<?XML broken XML document text !:mime text/xml !:strength - 10