Merge branch 'master' into base64

pull/237/head
Terrtia 2018-06-29 14:57:46 +02:00
commit 98d0235fc3
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
3 changed files with 9 additions and 5 deletions

View File

@ -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

View File

@ -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)
@ -219,7 +223,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:

View File

@ -187,7 +187,7 @@
<span class="label-icon">ERROR </span>
<i class="fa fa-times"></i>
</button>
<a class="btn btn-tags pull-left hidden" href="{{ url_for('Tags.get_tagged_paste') }}?ltags=submitted" target="_blank" id="submit_result">
<a class="btn btn-tags pull-left hidden" href="{{ url_for('Tags.get_tagged_paste') }}?ltags=infoleak:submission=&quot;manual&quot;" target="_blank" id="submit_result">
<span class="label-icon">Submitted Pastes </span>
<i class="fa fa-paper-plane fa-2x"></i>
</a>