Commit b0bb1b0a authored by joubu's avatar joubu Committed by Kyle M Hall

Bug 17904: Fix possible SQL injection in late orders

To recreate:
/cgi-bin/koha/acqui/lateorders.plop=send_alert&ordernumber=1)and%20(select*from(select(sleep(20)))a)--%20&letter_code=0

Notice the delay.

The SQL query is not constructed correctly, placeholders must be used.

This vulnerability has been reported by MDSec.
Signed-off-by: default avatarMirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: default avatarMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: default avatarKyle M Hall <kyle@bywatersolutions.com>
parent 179ff58b
......@@ -478,10 +478,10 @@ sub SendAlerts {
carp "No order selected";
return { error => "no_order_selected" };
}
$strsth .= join( ",", @$externalid ) . ")";
$strsth .= join( ",", ('?') x @$externalid ) . ")";
$action = "ACQUISITION CLAIM";
$sthorders = $dbh->prepare($strsth);
$sthorders->execute;
$sthorders->execute( @$externalid );
$dataorders = $sthorders->fetchall_arrayref( {} );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment