aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar TDavis 2019-03-30 02:11:17 -0300
committerLibravatar TDavis 2019-03-30 02:11:17 -0300
commitcaadbc2788d32fdc4baf9cbd197c0fb5d495e580 (patch)
treea3dce45d6ef383018a33330d07c249b0b092a3fb
parent1bca19b22bc68e114d04616e9ce4268e5eb94335 (diff)
downloadweabot-caadbc2788d32fdc4baf9cbd197c0fb5d495e580.tar.gz
weabot-caadbc2788d32fdc4baf9cbd197c0fb5d495e580.tar.xz
weabot-caadbc2788d32fdc4baf9cbd197c0fb5d495e580.zip
Mover hilos fix 4 Test 6
-rw-r--r--cgi/formatting.py12
-rw-r--r--cgi/manage.py1
2 files changed, 5 insertions, 8 deletions
diff --git a/cgi/formatting.py b/cgi/formatting.py
index d21bee2..6b2d8bc 100644
--- a/cgi/formatting.py
+++ b/cgi/formatting.py
@@ -121,11 +121,8 @@ def iphash(ip, post, t, useid, mobile, agent, cap_id, hide_end, has_countrycode)
id = '???'
else:
day = int((current_t + (Settings.TIME_ZONE*3600)) / 86400)
- word = ',' + str(day)
-
- # Make difference by thread
- word += ',' + str(t)
-
+ word = ',' + str(day) # IDs change every 24 hours
+ word += ',' + str(t) # IDs vary depending on thread
id = hide_data(ip + word, 6, "id", Settings.SECRET)
if hide_end:
@@ -164,9 +161,8 @@ def iphash(ip, post, t, useid, mobile, agent, cap_id, hide_end, has_countrycode)
if addressIsBanned(ip, ""):
id += '#'
- if (not has_countrycode and
- not addressIsTor(ip) and
- (addressIsProxy(ip) or not addressIsES(ip))):
+ elif (not has_countrycode and not addressIsTor(ip) and
+ (addressIsProxy(ip) or not addressIsES(ip))):
id += '!'
return id
diff --git a/cgi/manage.py b/cgi/manage.py
index af6a687..36217b9 100644
--- a/cgi/manage.py
+++ b/cgi/manage.py
@@ -477,6 +477,7 @@ def manage(self, path_split):
tym = parent_time
else:
tym = post["timestamp"]
+ message += "IP: "+post['ip']
post['timestamp_formatted'] += ' ID:' + iphash(post['ip'], post, tym, board["useid"], False, '', False, False, (board["countrycode"] in ['1', '2']))
# insert new post and get its new ID