mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Escaping $locale values in Translatable->augmentSQL() in addition to the i18n::validate_locale() input validation (from r114515)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114516 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6255cdf20a
commit
6fa8f8341c
@ -553,7 +553,7 @@ class Translatable extends DataObjectDecorator implements PermissionProvider {
|
||||
&& !preg_match('/("|\'|`)Locale("|\'|`)/', $query->getFilter())
|
||||
//&& !$query->filtersOnFK()
|
||||
) {
|
||||
$qry = sprintf('"%s"."Locale" = \'%s\'', $baseTable, $locale);
|
||||
$qry = sprintf('"%s"."Locale" = \'%s\'', $baseTable, Convert::raw2sql($locale));
|
||||
$query->where[] = $qry;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user