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