commit e79873fdae9b0bca67c6c04c9b31f4c70a23a959
parent c6cfdeb038b3f5d582a0c1e38393293de70d16b7
Author: rbckman <rob@tarina.org>
Date: Wed, 19 Aug 2026 21:14:23 +0300
Merge github.com:rbckman/heartranked
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/apache2install.sh b/apache2install.sh
@@ -3,7 +3,7 @@
echo " THIS SCRIPT WILL INSTALL HEARTRANKED BEEING SERVED WITH APACHE2"
echo " I RECOMMEND INSTALLING HEARTRANKED IN DEFAULT /var/www/ FOLDER to NOT run into write issues."
echo " YOU MUST UNINSTALL ANY OLD DEBIAN python-webpy packages otherwise it won't update"
-echo " apt purge python3-webpy"
+echo " apt purge python3-webpy libapache2-mod-wsgi-py3"
ROOT_UID=0 # Root has $UID 0.
diff --git a/server.py b/server.py
@@ -1746,6 +1746,9 @@ def symlinkthis(postid,user):
class upload:
def POST(self):
if logged():
+ if session.postid == '':
+ session.postid = hashlib.sha256(str(random.getrandbits(256)).encode('utf-8')).hexdigest()[9:36]
+ os.makedirs(basedir+'u/'+session.user+'/posts/'+session.postid,exist_ok=True)
try:
extensions=['zip','pdf','txt','md','mp4','jpeg','jpg','png','gif','wav','flac','mp3','ogg']
saved_files = []