PDOException with keyword too long

Created on 3 January 2019, almost 6 years ago
Updated 5 June 2024, 5 months ago

When an User (maybe a malicious user) try to search on search api page with a key word too long (260 character) a PDO Exception happens and it is:

PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'keywords' at row 1: INSERT INTO {search_api_stats} (s_name, i_name, timestamp, uid, sid, keywords, filters, sort, language) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8); Array ( [:db_insert_placeholder_0] => database_indici [:db_insert_placeholder_1] => indici_nodi [:db_insert_placeholder_2] => 1546493293 [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => DsVLqaenbGfpRmDeuxiZC7XRJOprZkVx4-ELGoDD-1c [:db_insert_placeholder_5] => printmail search node user user user user user user user user user user user user user user user user user user user user user user user user user user user user user user user user login [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => it ) in search_api_stats_search_api_query_alter() (linea 54 di /var/www/mysite/sites/all/modules/search_api_stats/search_api_stats.module).

I wait for response.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇹Italy cozzamara

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024