Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX:BP:11.5] Sanitize frequent and last searches output #3591

Conversation

dkd-friedrich
Copy link
Member

@dkd-friedrich dkd-friedrich commented Apr 5, 2023

Backport of #3590


What this pr does

Wraps output of frequent searches and last searches in format.htmlentities, to prevent XSS. In rare scenarios there might be issues with unsanitized output of frequent searches and/or last searches, this issues are now solved.

The StatisticsWriterProcessor is already sanitizing the stored terms, but as it's possible to use any custom table it should be ensured the data is sanitized.

If last searches is activated and configured for global mode, there might be issues too. Though it's required that the prepared query delivers result documents, as EXT:solr will only store the terms if results are found, the output should be sanitized too.

Please add a description here

How to test

As special configurations and index contents are required to reproduce the issues, the easiest way is to place simulated data in tx_solr_statistics and tx_solr_last_searches. If last searches and frequent searches (global mode) are activated a sanitized string should be visible.

Ports: #3590
Resolves: #3589

Wraps output of frequent searches and last searches in
format.htmlentities, to prevent XSS. In rare scenarios
there might be issues with unsanitized output of frequent
searches and/or last searches, this issues are now solved.

The StatisticsWriterProcessor is already sanitizing the stored
terms, but as it's possible to use any custom table it should be
ensured the data is sanitized.

If last searches is activated and configured for global mode,
there might be issues too. Though it's required that the prepared
query delivers result documents, as EXT:solr will only store the
terms if results are found, the output should be sanitized too.

Ports: TYPO3-Solr#3590
Resolves: TYPO3-Solr#3589
@dkd-friedrich dkd-friedrich merged commit 47b2b0f into TYPO3-Solr:release-11.5.x Apr 5, 2023
@dkd-friedrich dkd-friedrich deleted the bugfix/release-11.5.x/3589-sanitize_frequent_and_last_search_output branch April 5, 2023 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant