Encoded characters may cause ticket subject to be too long
Posted: Fri Oct 19, 2018 8:09 am
Script URL:
Version of script: Hesk 2.8.2 + Mods For Hesk 2018.2.0
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
The "subject" input has a maxlength of 70 characters and "subject" column is of datatype VARCHAR(70). When submitting a ticket where the subject contains characters that are encoded (such as " or &), it can result in MySQL error "Data too long for column 'subject' at row 1", in which case the user sees a general MySQL error message. An example subject is Testing what would happen when the subject has "double quotes" in it.
Should there be more of a "buffer" between the maxlength and the MySQL length? Or should the inputs be validated (encode the input and calculate length) before inserting them to database to avoid MySQL errors?
Version of script: Hesk 2.8.2 + Mods For Hesk 2018.2.0
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
The "subject" input has a maxlength of 70 characters and "subject" column is of datatype VARCHAR(70). When submitting a ticket where the subject contains characters that are encoded (such as " or &), it can result in MySQL error "Data too long for column 'subject' at row 1", in which case the user sees a general MySQL error message. An example subject is Testing what would happen when the subject has "double quotes" in it.
Should there be more of a "buffer" between the maxlength and the MySQL length? Or should the inputs be validated (encode the input and calculate length) before inserting them to database to avoid MySQL errors?