summaryrefslogtreecommitdiffstats
path: root/blog
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-08 12:09:36 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-08 12:09:36 +0800
commit78083da2c29ef4554e4e873dc078b44c0de06514 (patch)
treed6588856ca96a2fa346d1e2b24f97b9b9a94f727 /blog
parent5b9084ec7a3f63cdd035be7204190c03c66e6694 (diff)
downloadpttbbs-78083da2c29ef4554e4e873dc078b44c0de06514.tar
pttbbs-78083da2c29ef4554e4e873dc078b44c0de06514.tar.gz
pttbbs-78083da2c29ef4554e4e873dc078b44c0de06514.tar.bz2
pttbbs-78083da2c29ef4554e4e873dc078b44c0de06514.tar.lz
pttbbs-78083da2c29ef4554e4e873dc078b44c0de06514.tar.xz
pttbbs-78083da2c29ef4554e4e873dc078b44c0de06514.tar.zst
pttbbs-78083da2c29ef4554e4e873dc078b44c0de06514.zip
use $dbh->quote
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1041 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'blog')
-rwxr-xr-xblog/blog.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/blog/blog.pl b/blog/blog.pl
index 838fa676..c4984e7c 100755
--- a/blog/blog.pl
+++ b/blog/blog.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $Id: blog.pl,v 1.28 2003/07/06 03:56:38 in2 Exp $
+# $Id: blog.pl,v 1.29 2003/07/08 04:09:36 in2 Exp $
use CGI qw/:standard/;
use lib qw/./;
use LocalVars;
@@ -255,11 +255,14 @@ sub main
my($dbh) = @_;
my($t, $hash);
$t = time();
+ $name = $dbh->quote($name);
+ $mail = $dbh->quote($mail);
+ $comment = $dbh->quote($comment);
$hash = MD5->hexhash("$t$th{key}$name$mail$comment");
$dbh->do('insert into comment '.
'(brdname, artid, name, mail, content, mtime, hash) '.
- "values ('$brdname', '$th{key}', '$name', '$mail', ".
- "'$comment', '$t', '$hash')");
+ "values ('$brdname', '$th{key}', $name, $mail, ".
+ "$comment, '$t', '$hash')");
});
}