Ignore:
Timestamp:
May 4, 2020 2:25:31 AM (4 years ago)
Author:
anonymous
Message:

Use the /u regex modifier only when using UTF-8. Disable indexed array key removal from URL query args.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Upload.inc.php

    r595 r724  
    516516
    517517        $file_name = preg_replace(array(
    518             '/&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml|caron);/ui',
    519             '/&(?:amp);/ui',
    520             '/[&;]+/u',
    521             '/[^a-zA-Z0-9()@._=+-]+/u',
    522             '/^_+|_+$/u'
     518            '/&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml|caron);/i' . $app->getParam('preg_u'),
     519            '/&(?:amp);/i' . $app->getParam('preg_u'),
     520            '/[&;]+/' . $app->getParam('preg_u'),
     521            '/[^a-zA-Z0-9()@._=+-]+/' . $app->getParam('preg_u'),
     522            '/^_+|_+$/' . $app->getParam('preg_u')
    523523        ), array(
    524524            '$1',
Note: See TracChangeset for help on using the changeset viewer.