Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysqli: escape raw string values #598

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions include/dblayer/functions_mysqli.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ function mass_updates($tablename, $dbfields, $datas, $flags=0)

if (isset($data[$key]) and $data[$key] != '')
{
$query.= $separator.$key.' = \''.$data[$key].'\'';
$query.= $separator.$key.' = \''.pwg_db_real_escape_string($data[$key]).'\'';
}
else
{
Expand All @@ -338,7 +338,7 @@ function mass_updates($tablename, $dbfields, $datas, $flags=0)
}
if (isset($data[$key]))
{
$query.= $key.' = \''.$data[$key].'\'';
$query.= $key.' = \''.pwg_db_real_escape_string($data[$key]).'\'';
}
else
{
Expand Down Expand Up @@ -453,7 +453,7 @@ function single_update($tablename, $datas, $where, $flags=0)

if (isset($value) and $value !== '')
{
$query.= $separator.$key.' = \''.$value.'\'';
$query.= $separator.$key.' = \''.pwg_db_real_escape_string($value).'\'';
}
else
{
Expand Down Expand Up @@ -481,7 +481,7 @@ function single_update($tablename, $datas, $where, $flags=0)
}
if (isset($value))
{
$query.= $key.' = \''.$value.'\'';
$query.= $key.' = \''.pwg_db_real_escape_string($value).'\'';
}
else
{
Expand Down Expand Up @@ -556,7 +556,7 @@ function mass_inserts($table_name, $dbfields, $datas, $options=array())
}
else
{
$query .= "'".$insert[$dbfield]."'";
$query .= "'".pwg_db_real_escape_string($insert[$dbfield])."'";
}
}
$query .= ')';
Expand Down Expand Up @@ -600,7 +600,7 @@ function single_insert($table_name, $data)
}
else
{
$query .= "'".$value."'";
$query .= "'".pwg_db_real_escape_string($value)."'";
}
}
$query .= ')';
Expand Down