diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-07-08 12:09:36 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-07-08 12:09:36 +0800 |
commit | 61bb8e2eb136076c52adc1e7b88381c683c0ca7b (patch) | |
tree | 4caf0ecb3bde1246a8e0a87b801b2dbeea2ee68a | |
parent | 792fb835bceea4ec78670cc395fa855d0efcc020 (diff) | |
download | pttbbs-61bb8e2eb136076c52adc1e7b88381c683c0ca7b.tar pttbbs-61bb8e2eb136076c52adc1e7b88381c683c0ca7b.tar.gz pttbbs-61bb8e2eb136076c52adc1e7b88381c683c0ca7b.tar.bz2 pttbbs-61bb8e2eb136076c52adc1e7b88381c683c0ca7b.tar.lz pttbbs-61bb8e2eb136076c52adc1e7b88381c683c0ca7b.tar.xz pttbbs-61bb8e2eb136076c52adc1e7b88381c683c0ca7b.tar.zst pttbbs-61bb8e2eb136076c52adc1e7b88381c683c0ca7b.zip |
use $dbh->quote
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@1041 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-x | pttbbs/blog/blog.pl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pttbbs/blog/blog.pl b/pttbbs/blog/blog.pl index 838fa676..c4984e7c 100755 --- a/pttbbs/blog/blog.pl +++ b/pttbbs/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')"); }); } |