Filter for values saved into tx_sgcookieoptin_domain_model_user_preference (item_identifier column)

So it seems someone tried to do SQL injections at one instance where we use the plugin (current 4.6.0 version) via the tx_sgcookieoptin_domain_model_user_preference table.

SELECT DISTINCT item_identifier FROM tx_sgcookieoptin_domain_model_user_preference;

essential
marketing
statistiken

-1 OR OR 2+205-205-1=0+0+0+1
-1 OR 2+210-210-1=0+0+0+1 --
[hundreds more]

In the backend module for statistics then a pie chart is created for every value of item_identifier:

image

Note: The first graph is probably for item_identifier = '', not sure if this should ever happen.

A possible solution could be to filter for valid 'Service groups' before inserting them in OptinHistoryService.php

Edited by Manuel Munz