From 5908710b3475ad7353acf0cb65bfd44da4932fe9 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 29 Jun 2018 11:29:52 +0200 Subject: [PATCH 1/4] fix: update submitted tags link --- var/www/modules/PasteSubmit/templates/submiting.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/www/modules/PasteSubmit/templates/submiting.html b/var/www/modules/PasteSubmit/templates/submiting.html index 9ab52465..b7ad78e3 100644 --- a/var/www/modules/PasteSubmit/templates/submiting.html +++ b/var/www/modules/PasteSubmit/templates/submiting.html @@ -187,7 +187,7 @@ ERROR - From 407aa14244f290b619b3077d8d1883dc82ba6405 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 29 Jun 2018 11:32:52 +0200 Subject: [PATCH 2/4] fix: catch file error in paste submission --- bin/submit_paste.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/submit_paste.py b/bin/submit_paste.py index 49c8e1f0..7417fa15 100755 --- a/bin/submit_paste.py +++ b/bin/submit_paste.py @@ -29,8 +29,12 @@ def create_paste(uuid, paste_content, ltags, ltagsgalaxies, name): addError(uuid, 'File: ' + save_path + ' already exist in submitted pastes') return 1 - gzipencoded = gzip.compress(paste_content) - gzip64encoded = base64.standard_b64encode(gzipencoded).decode() + try: + gzipencoded = gzip.compress(paste_content) + gzip64encoded = base64.standard_b64encode(gzipencoded).decode() + except: + abord_file_submission(uuid, "file error") + continue # send paste to Global module relay_message = "{0} {1}".format(save_path, gzip64encoded) From c41a165a218a01835b36e8544e699f1b9b0199a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thirion=20Aur=C3=A9lien?= Date: Fri, 29 Jun 2018 12:08:46 +0200 Subject: [PATCH 3/4] fix: file submission, content type --- bin/submit_paste.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/submit_paste.py b/bin/submit_paste.py index 7417fa15..c1feebea 100755 --- a/bin/submit_paste.py +++ b/bin/submit_paste.py @@ -212,7 +212,7 @@ if __name__ == "__main__": abord_file_submission(uuid, "file error") continue r_serv_log_submit.set(uuid + ':nb_total', 1) - create_paste(uuid, content, ltags, ltagsgalaxies, uuid) + create_paste(uuid, content.encode(), ltags, ltagsgalaxies, uuid) remove_submit_uuid(uuid) else: From 72146f938e92d650830469e31ed44367bbe02590 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 29 Jun 2018 13:50:41 +0200 Subject: [PATCH 4/4] change: feeder name separator --- bin/Mixer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/Mixer.py b/bin/Mixer.py index 309bb32a..98709ea5 100755 --- a/bin/Mixer.py +++ b/bin/Mixer.py @@ -93,7 +93,7 @@ if __name__ == '__main__': try: #feeder_name = ( complete_paste.replace("archive/","") ).split("/")[0] - feeder_name, paste_name = complete_paste.split('>') + feeder_name, paste_name = complete_paste.split('>>') feeder_name.replace(" ","") paste_name = complete_paste