iankelling.org
/
git
/
iankelling.org
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small update to favorites
[iankelling.org]
/
_site
/
cgi
/
comment
diff --git
a/_site/cgi/comment
b/_site/cgi/comment
index 4b14c3c7c7bd9c3dfa9337a8494656913f662917..b84c45ebe6076132bf81a39b0cb1da5d3820eb00 100755
(executable)
--- a/
_site/cgi/comment
+++ b/
_site/cgi/comment
@@
-142,6
+142,10
@@
if COMMENT_TXT.length > 1000 or GOTO.length > 150
fail('length of comment or goto is too great')
end
fail('length of comment or goto is too great')
end
+if COMMENT_TXT.length <= 2 or COMMENT_TXT =~ /\A\s*\Z/
+ fail('not enough content in comment')
+end
+
captchad = false
if cgi.has_key?('answer') && cgi.has_key?('question')
captchad = false
if cgi.has_key?('answer') && cgi.has_key?('question')
@@
-300,7
+304,7
@@
$db.execute('insert into c values (NULL, ?, ?, ?, ?, ?)',
COMMENT_TXT])
if date
COMMENT_TXT])
if date
- new_count = $db.execute(query + 'and date > ?',date)
+ new_count = $db.execute(query + 'and date > ?',
date)
else
new_count = $db.execute(query)
end
else
new_count = $db.execute(query)
end
@@
-328,7
+332,7
@@
END_OF_MESSAGE
smtp.send_message msg, opts[:from], opts[:to]
end
end
smtp.send_message msg, opts[:from], opts[:to]
end
end
- send_email :subject =>
'new comments on iankelling.org'
+ send_email :subject =>
"new comment on #{DN}"
end
post(md_file)
end
post(md_file)