Re: [PATCH] sanitize email address in comments
will guaraldi <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks! I checked it in, though I skipped the part of the patch dealing
with "human".
It'll be out in the next contributed plugins pack release which I will
release soon [1].
/will
[1] Though, I've been saying that for months now. Naughty me.
On Fri, 17 Mar 2006, David Pashley wrote:
> This probably isn't needed, but I figured it wouldn't hurt. My comments
> had been attacked, but the comments didn't allow any spam to be sent.
>
> Included is my patch for a simple turing test using a checkbox
>
> --- /tmp/comments.py 2005-04-09 08:02:34.000000000 +0100
> +++ plugins/comments.py 2006-03-14 23:42:31.967782000 +0000
> @@ -363,7 +363,7 @@
> author = escape_SMTP_commands(clean_author(comment['author']))
> description = escape_SMTP_commands(comment['description'])
> if comment.has_key('email'):
> - email = comment['email']
> + email = escape_SMTP_commands(clean_author(comment['email']))
> else:
> email = config['comment_smtp_from']
> try:
> @@ -540,8 +540,8 @@
> 'description' : add_dont_follow(body, config) }
> if form.has_key('email'):
> cdict['email'] = form['email'].value
> -
> - data["comment_message"] = writeComment(request, config, data, \
> + if form.has_key('human'):
> + data["comment_message"] = writeComment(request, config, data, \
> cdict, encoding)
> def escape_link(linkstring):
> """Don't allow html in the link string"""
>
>
>
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642