ezplatform-solr-search-engine icon indicating copy to clipboard operation
ezplatform-solr-search-engine copied to clipboard

EZP-30759: Creating content with terminal escape codes chars inside Searchable field will return 500 error when using Solr

Open kmadejski opened this issue 6 years ago • 2 comments

Question Answer
JIRA issue EZP-30759
Bug yes
New feature no
Target version 1.5 and higher

This PR fixes the issue described in the mentioned JIRA ticket. The simple solution is to filter out all the terminal escape characters but just for Solr as Legacy storage handles it without any issue.

I'll add type hints on merge up, as 1.5 can be used with eZ Platform v1.x on PHP 5.x.

I'm about to create an issue in Solr's JIRA tracker, but as for now, I'm waiting for their devs to confirm that from their perspective this can be considered as a bug. I'll update the PR and add a comment in the code once the issue is created.

kmadejski avatar Oct 25 '19 10:10 kmadejski

-1. We should quote special chars instead of stripping them out. Esp. if this is done pervasively. Do you prohibit single quotes chars from ever being stored in varchar fields in databases?

gggeek avatar Nov 14 '19 11:11 gggeek

ps: I agree about filtering out a very limited set of characters, but not fe. '['. Also, I'd try to push any stripping to the kernel, so that the data stored in Solr and in the db is as much in sync as possible.

gggeek avatar Nov 14 '19 11:11 gggeek