Escape single quotes before posting to osTicket

* Only done for the post body for now
This commit is contained in:
2Shirt 2019-05-29 20:01:16 -06:00
parent ed339866f7
commit e99f16300f
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -524,7 +524,7 @@ class osTicket():
sql_cmd += " VALUES ("
sql_cmd += " '{}',".format(ticket_id)
sql_cmd += " '{ID}', '{Name}',".format(**OSTICKET['Staff'])
sql_cmd += " '{}',".format(response)
sql_cmd += " '{}',".format(response.replace("'", "\\'"))
sql_cmd += " '{}'".format(time.strftime("%Y-%m-%d %H:%M:%S"))
sql_cmd += " );"