mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-26 15:57:16 +00:00
fix: [tag export] limit custom tag lenght
This commit is contained in:
parent
f91aba5f6f
commit
2c46c7f2ab
2 changed files with 7 additions and 0 deletions
|
@ -605,6 +605,10 @@ def disable_hive_auto_alert():
|
||||||
@PasteSubmit.route("/PasteSubmit/add_push_tag")
|
@PasteSubmit.route("/PasteSubmit/add_push_tag")
|
||||||
def add_push_tag():
|
def add_push_tag():
|
||||||
tag = request.args.get('tag')
|
tag = request.args.get('tag')
|
||||||
|
#limit tag length
|
||||||
|
if len(tag) > 49:
|
||||||
|
tag = tag[0:48]
|
||||||
|
|
||||||
r_serv_db.sadd('list_export_tags', tag)
|
r_serv_db.sadd('list_export_tags', tag)
|
||||||
|
|
||||||
to_return = {}
|
to_return = {}
|
||||||
|
|
|
@ -135,6 +135,9 @@ def mixUserName(supplied, extensive=False):
|
||||||
|
|
||||||
def save_tag_to_auto_push(list_tag):
|
def save_tag_to_auto_push(list_tag):
|
||||||
for tag in set(list_tag):
|
for tag in set(list_tag):
|
||||||
|
#limit tag length
|
||||||
|
if len(tag) > 49:
|
||||||
|
tag = tag[0:48]
|
||||||
r_serv_db.sadd('list_export_tags', tag)
|
r_serv_db.sadd('list_export_tags', tag)
|
||||||
|
|
||||||
# ============ ROUTES ============
|
# ============ ROUTES ============
|
||||||
|
|
Loading…
Reference in a new issue