Skip to content

Commit

Permalink
fixing bug caused by not escaping double quetes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Wolniewicz committed Nov 27, 2024
1 parent 3fb738b commit ae95889
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/admin/duplicate_profile_result.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,17 @@
$auth = new \web\lib\admin\Authentication();
$auth->authenticate();


function copyRow($row, $feldsArray, $table, $dbHandle) {
$fieldsList = implode(',', array_keys($row));
foreach ($row as $key => $value) {
if ($feldsArray[$key] == 's') {
if ($value === null) {
$row[$key] = 'NULL';
} else {
$row[$key] = '"'.$value.'"';
$e1 = str_replace('\\', '\\\\', $value);
$e2 = str_replace('"', '\"', $e1);
$row[$key] = '"'.$e2.'"';
}
}
}
Expand Down

0 comments on commit ae95889

Please sign in to comment.