1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Fix for mod-security being triggered by Media Manager wildcard filter

This commit is contained in:
Cameron 2022-04-02 13:03:01 -07:00
parent da7c1b087d
commit 813f2bf38f

View File

@ -1004,10 +1004,10 @@ class media_admin_ui extends e_admin_ui
$mimeTypes[$id] = $id;
}
$mimeTypes['image/*'] = 'image/*';
$mimeTypes['video/*'] = 'video/*';
$mimeTypes['audio/*'] = 'audio/*';
$mimeTypes['application/*'] = 'application/*';
$mimeTypes['image/%'] = 'image/*';
$mimeTypes['video/%'] = 'video/*';
$mimeTypes['audio/%'] = 'audio/*';
$mimeTypes['application/%'] = 'application/*';
asort($mimeTypes);
$this->fields['media_category']['writeParms'] = $this->cats;
@ -1203,9 +1203,8 @@ class media_admin_ui extends e_admin_ui
/** Wildcard support for media-type filter */
function handleGridMediaTypeFilter($var)
{
if(strpos($var,'*')!== false)
if(strpos($var,'%') !== false)
{
$var = str_replace('*', '%', $var);
return "m.media_type LIKE '".$var."'";
}