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] Sanitize frequent and last searches output #3590

Conversation

dkd-friedrich
Copy link
Member

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

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.

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.

Resolves: TYPO3-Solr#3589
dkd-friedrich added a commit to dkd-friedrich/ext-solr that referenced this pull request Apr 5, 2023
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 added a commit to dkd-friedrich/ext-solr that referenced this pull request Apr 5, 2023
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 added a commit to dkd-friedrich/ext-solr that referenced this pull request Apr 5, 2023
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 8ad9817 into TYPO3-Solr:main Apr 5, 2023
dkd-friedrich added a commit that referenced this pull request Apr 5, 2023
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: #3590
Resolves: #3589
dkd-friedrich added a commit that referenced this pull request Apr 5, 2023
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: #3590
Resolves: #3589
@dkd-friedrich dkd-friedrich deleted the bugfix/main/3589-sanitize_frequent_and_last_search_output branch April 5, 2023 13:00
@dkd-kaehm dkd-kaehm mentioned this pull request Oct 13, 2023
1 task
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.

[SECURITY][XSS][BUG] Sanatize Output for Query in FequentlySearched, Last Searches
1 participant