Skip to content

Commit 229e322

Browse files
bramleymarianaballa
authored andcommitted
Escape the column name in query to find attribute
1 parent d5afacd commit 229e322

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

public_html/lists/admin/import2.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@
298298
} else {
299299
//# define mapping based on existing attribute or ask for it
300300
//@@ Why is $attributes not used
301-
$existing = Sql_Fetch_Row_Query('select id from '.$tables['attribute']." where name = \"$column\"");
301+
$query = sprintf('select id from %s where name = "%s"', $tables['attribute'], sql_escape($column));
302+
$existing = Sql_Fetch_Row_Query($query);
302303
$_SESSION['import_attribute'][$column] = array(
303304
'index' => $i,
304305
'record' => $existing[0],

0 commit comments

Comments
 (0)