Bug #69227

Strings for like are not properly escaped

Added by Morton Jonuschat about 4 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Category:
Indexed Search
Target version:
Start date:
2015-08-21
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Search strings are not being properly escaped before being used with LIKE in search queries. This is relevant if the search string contains % or _ which are special placeholders in LIKE queries

Associated revisions

Revision 18d78fd1 (diff)
Added by Morton Jonuschat about 4 years ago

[BUGFIX] Indexed Search: Escape search strings for LIKE queries

LIKE queries support special placeholders (_ and %). These characters
need proper escaping before being used in database queries. Use the
escapeStrForLike() method to provide properly escaped strings to the
query.

Resolves: #69227
Releases: master
Change-Id: I29c41bfecdbc13e8156ab9257b906696bc7a5e4f
Reviewed-on: http://review.typo3.org/42806
Tested-by: Philipp Gampe <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Alexander Opitz <>
Tested-by: Alexander Opitz <>

Revision 5f879e26 (diff)
Added by Tymoteusz Motylewski about 4 years ago

[!!!][BUGFIX] Indexed Search: Escape search strings for LIKE queries

LIKE queries support special placeholders (_ and %).
These characters need proper escaping before being used
in database queries. Use the escapeStrForLike() method to
provide properly escaped strings to the query.

This patch handles few places missed by http://review.typo3.org/42806

Resolves: #69227
Releases: master
Change-Id: Ie68dd140aafa755be08ba9505b3ac33f00a8f2e2
Reviewed-on: http://review.typo3.org/42969
Reviewed-by: Alexander Opitz <>
Tested-by: Alexander Opitz <>
Tested-by: Benni Mack <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Gerrit Code Review about 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42806

#2 Updated by Gerrit Code Review about 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42806

#3 Updated by Gerrit Code Review about 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42806

#4 Updated by Morton Jonuschat about 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#5 Updated by Gerrit Code Review about 4 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#6 Updated by Gerrit Code Review about 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#7 Updated by Gerrit Code Review about 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#8 Updated by Gerrit Code Review about 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#9 Updated by Gerrit Code Review about 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#10 Updated by Gerrit Code Review about 4 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#11 Updated by Gerrit Code Review about 4 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#12 Updated by Gerrit Code Review about 4 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#13 Updated by Benni Mack about 4 years ago

  • Sprint Focus set to Stabilization Sprint

#14 Updated by Gerrit Code Review about 4 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#15 Updated by Gerrit Code Review about 4 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#16 Updated by Gerrit Code Review about 4 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#17 Updated by Gerrit Code Review about 4 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42969

#18 Updated by Benni Mack about 4 years ago

  • Target version changed from 7.5 to 7 LTS
  • Sprint Focus deleted (Stabilization Sprint)

#19 Updated by Tymoteusz Motylewski about 4 years ago

  • Status changed from Under Review to Resolved

#20 Updated by Riccardo De Contardi almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF