aboutsummaryrefslogtreecommitdiff
path: root/cgi/weabot.py
diff options
context:
space:
mode:
Diffstat (limited to 'cgi/weabot.py')
-rwxr-xr-xcgi/weabot.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/cgi/weabot.py b/cgi/weabot.py
index c1bc1a3..eaf4477 100755
--- a/cgi/weabot.py
+++ b/cgi/weabot.py
@@ -478,7 +478,9 @@ class weabot(object):
# use fields only if enabled
if not board["disable_name"]:
post["name"] = cleanString(name)
+
post["email"] = cleanString(email, quote=True)
+
if not board["disable_subject"]:
post["subject"] = cleanString(subject)
@@ -592,7 +594,7 @@ class weabot(object):
# make ID hash
if board["useid"]:
- post["timestamp_formatted"] += ' ID:' + iphash(ip, post, tim, board["useid"], mobile,
+ post["posterid"] = iphash(ip, post, tim, board["useid"], mobile,
self.environ["HTTP_USER_AGENT"], cap_id, hide_end, (board["countrycode"] in [1, 2]))
# use for future file checks
@@ -729,14 +731,13 @@ class weabot(object):
hosts = host.split('.')
if len(hosts) > 2:
if hosts[-2] in ['ne', 'net', 'com', 'co']:
- host = '.'.join(
- (hosts[-3], hosts[-2], hosts[-1]))
+ host = '.'.join((hosts[-3], hosts[-2], hosts[-1]))
else:
host = '.'.join((hosts[-2], hosts[-1]))
host = '*.' + host
elif ':' in ip:
iprs = ip.split(':')
- host = '%s:%s:*:*:*.*.*.*' % (iprs[0], iprs[1])
+ host = '%s:%s:%s:*:*.*.*.*' % (iprs[0], iprs[1], iprs[2])
else:
iprs = ip.split('.')
host = '%s.%s.*.*' % (iprs[0], iprs[1])