Skip to content

Commit b1ed926

Browse files
author
Marius Cramer
committed
Improved input validation
1 parent f2fc77f commit b1ed926

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/web/admin/language_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
$file_content = "<?php\n";
5858
foreach($_POST['records'] as $key => $val) {
5959
$val = stripslashes($val);
60-
$val = str_replace('"', '\"', $val);
60+
$val = preg_replace('/(^|[^\\\\])((\\\\\\\\)*)"/', '$1$2\\"', $val);
6161
$val = str_replace('$', '', $val);
6262
$file_content .= '$wb['."'$key'".'] = "'.$val.'";'."\n";
6363
$msg = 'File saved.';

0 commit comments

Comments
 (0)