Skip to content

Commit 2154fb6

Browse files
committed
Escape all fields before using them.
Files changed in commit: Z_ImportStocks.php
1 parent 1d7a70b commit 2154fb6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Z_ImportStocks.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108

109109
// cleanup row fields (strip spaces, horizontal and vertical tabs, and LF, CR and NUL chars from beginning and end of field)
110110
foreach ($MyRow as &$Value) {
111-
$Value = trim($Value);
111+
$Value = DB_escape_string(trim($Value));
112112
}
113113

114114
// search for stockid to find if it already exists
@@ -338,9 +338,9 @@
338338
echo '<br/>', __('Skip Row if Stock ID Exists'), ':<input type="checkbox" name="SkipExisting" ';
339339

340340
echo '<br />';
341-
341+
342342
echo '<br/>', __('Update Current Data if Stock ID Exists (not yet implemented)'), ':<input type="checkbox" name="UpdateExisting" ';
343-
343+
344344
echo '</div>
345345
</form>';
346346
}

0 commit comments

Comments
 (0)