1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Immunity against CRLF

This commit is contained in:
Jakub Vrana
2010-10-16 22:36:01 +02:00
parent 0198c36c90
commit 53804a2c20
2 changed files with 2 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ foreach (array_merge(
foreach (glob(dirname(__FILE__) . "/adminer/lang/" . ($_SESSION["lang"] ? $_SESSION["lang"] : "*") . ".inc.php") as $filename) {
$messages = $messages_all;
$file = file_get_contents($filename);
$file = str_replace("\r", "", $file);
preg_match_all("~^(\\s*)(?:// )?(('(?:[^\\\\']+|\\\\.)*') => .*[^,\n]),?~m", $file, $matches, PREG_SET_ORDER);
$s = "";
foreach ($matches as $match) {