aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorLibravatar TOW 2019-03-29 08:51:07 -0300
committerLibravatar TOW 2019-03-29 08:51:07 -0300
commit11cf1bfb6856f09b0123d2aeafa25abd6ef526b9 (patch)
tree8e739b921187e97a4de908bbbc86f7eb05283ca2 /cgi
parent6f703d8e197b40d9b35609b4b989b99a9e10c020 (diff)
downloadweabot-11cf1bfb6856f09b0123d2aeafa25abd6ef526b9.tar.gz
weabot-11cf1bfb6856f09b0123d2aeafa25abd6ef526b9.tar.xz
weabot-11cf1bfb6856f09b0123d2aeafa25abd6ef526b9.zip
Arreglado bug en oekaki que permite postear dibujo donde sea
Diffstat (limited to 'cgi')
-rw-r--r--cgi/oekaki.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cgi/oekaki.py b/cgi/oekaki.py
index f0bada7..14446d7 100644
--- a/cgi/oekaki.py
+++ b/cgi/oekaki.py
@@ -113,7 +113,7 @@ def oekaki(self, path_split):
# path splits:
# 3: Board
# 4: Parentid
- if path_split > 7:
+ if len(path_split) >= 5:
# Al terminar de dibujar, llegamos aqui. Damos la opcion de postearlo.
board = setBoard(path_split[3])
try:
@@ -121,6 +121,9 @@ def oekaki(self, path_split):
except:
parentid = None
+ if board['allow_oekaki'] != '1':
+ raise UserError, 'Esta sección no soporta oekaki.'
+
ts = int(time.time())
ip = inet_aton(self.environ["REMOTE_ADDR"])
fname = "%s/oek_temp/%d.png" % (Settings.HOME_DIR, ip)
@@ -144,7 +147,6 @@ def oekaki(self, path_split):
timetaken = 0
page += renderTemplate("board.html", {"threads": None, "oek_finish": oek, "replythread": parentid, "ts": ts})
-
elif path_split[2] == 'animation':
try:
board = setBoard(path_split[3])