disabled write actions in SQL macro for security reasons

This commit is contained in:
JT Smith 2003-07-01 23:55:45 +00:00
parent 5788df76a8
commit 2c7576bdad
3 changed files with 25 additions and 13 deletions

View file

@ -185,7 +185,7 @@ sub www_view {
WebGUI::ErrorHandler::warn("SQLReport [".$_[0]->get("wobjectId")."] The DSN specified is of an improper format.");
}
if (defined $dbh) {
if ($query =~ /select/i || $query =~ /show/i || $query =~ /describe/i) {
if ($query =~ /^select/i || $query =~ /^show/i || $query =~ /^describe/i) {
$sth = WebGUI::SQL->unconditionalRead($query,$dbh);
unless ($sth->errorCode < 1) {
$errorMessage = $sth->errorMessage;