Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 3e41ad8

Browse files
committed
Merge branch 'hotfix/3.5.31'
2 parents 2474ff9 + 0a88b04 commit 3e41ad8

File tree

10 files changed

+99
-81
lines changed

10 files changed

+99
-81
lines changed

composer.lock

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

system/config/constants.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Core version
1414
*/
1515
define('VERSION', '3.5');
16-
define('BUILD', '30');
16+
define('BUILD', '31');
1717
define('LONG_TERM_SUPPORT', true);
1818

1919

system/docs/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Contao Open Source CMS changelog
22
================================
33

4+
Version 3.5.31 (2017-11-15)
5+
---------------------------
6+
7+
### Fixed
8+
Prevent SQL injections in the back end search panel (see CVE-2017-16558).
9+
10+
411
Version 3.5.30 (2017-10-06)
512
---------------------------
613

system/modules/calendar/languages/pl/default.xlf

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
</trans-unit>
1616
<trans-unit id="MSC.cal_timeSeparator">
1717
<source>–</source>
18+
<target>–</target>
1819
</trans-unit>
1920
<trans-unit id="MSC.cal_emptyDay">
2021
<source>There are no events on this day.</source>

system/modules/core/drivers/DC_Table.php

+19-9
Original file line numberDiff line numberDiff line change
@@ -4943,23 +4943,33 @@ protected function searchMenu()
49434943
// Store search value in the current session
49444944
if (\Input::post('FORM_SUBMIT') == 'tl_filters')
49454945
{
4946-
$session['search'][$this->strTable]['value'] = '';
4947-
$session['search'][$this->strTable]['field'] = \Input::post('tl_field', true);
4946+
$strField = \Input::post('tl_field', true);
4947+
$strKeyword = ltrim(\Input::postRaw('tl_value'), '*');
4948+
4949+
if ($strField && !in_array($strField, $searchFields, true))
4950+
{
4951+
$strField = '';
4952+
$strKeyword = '';
4953+
}
49484954

49494955
// Make sure the regular expression is valid
4950-
if (\Input::postRaw('tl_value') != '')
4956+
if ($strField && $strKeyword)
49514957
{
49524958
try
49534959
{
4954-
$this->Database->prepare("SELECT * FROM " . $this->strTable . " WHERE " . \Input::post('tl_field', true) . " REGEXP ?")
4960+
$this->Database->prepare("SELECT * FROM " . $this->strTable . " WHERE " . $strField . " REGEXP ?")
49554961
->limit(1)
4956-
->execute(\Input::postRaw('tl_value'));
4957-
4958-
$session['search'][$this->strTable]['value'] = \Input::postRaw('tl_value');
4962+
->execute($strKeyword);
4963+
}
4964+
catch (\Exception $e)
4965+
{
4966+
$strKeyword = '';
49594967
}
4960-
catch (\Exception $e) {}
49614968
}
49624969

4970+
$session['search'][$this->strTable]['field'] = $strField;
4971+
$session['search'][$this->strTable]['value'] = $strKeyword;
4972+
49634973
$this->Session->setData($session);
49644974
}
49654975

@@ -5060,7 +5070,7 @@ protected function sortMenu()
50605070
$strSort = \Input::post('tl_sort');
50615071

50625072
// Validate the user input (thanks to aulmn) (see #4971)
5063-
if (in_array($strSort, $sortingFields))
5073+
if (in_array($strSort, $sortingFields, true))
50645074
{
50655075
$session['sorting'][$this->strTable] = in_array($GLOBALS['TL_DCA'][$this->strTable]['fields'][$strSort]['flag'], array(2, 4, 6, 8, 10, 12)) ? "$strSort DESC" : $strSort;
50665076
$this->Session->setData($session);

system/modules/core/languages/pl/tl_files.xlf

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
</trans-unit>
152152
<trans-unit id="tl_files.new.0">
153153
<source>New folder</source>
154-
<target>Nowy szablon</target>
154+
<target>Nowy folder</target>
155155
</trans-unit>
156156
<trans-unit id="tl_files.new.1">
157157
<source>Create a new folder</source>

system/modules/core/languages/pl/tl_settings.xlf

+1
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@
335335
</trans-unit>
336336
<trans-unit id="tl_settings.maxImageWidth.1">
337337
<source>If the width of an image or movie exceeds this value, it will be adjusted automatically. Set to 0 to disable the limit.</source>
338+
<target>Jeśli szerokość obrazka lub filmu przekroczy tą wartość, element zostanie automatycznie dostosowany. Wprowadź 0, aby wyłączyć limit.</target>
338339
</trans-unit>
339340
<trans-unit id="tl_settings.jpgQuality.0">
340341
<source>JPG thumbnail quality</source>

system/modules/core/library/Contao/StringUtil.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -605,13 +605,13 @@ function (array $matches) use ($arrData)
605605
$blnCurrent = $arrStack[count($arrStack) - 1];
606606
$blnCurrentIf = $arrIfStack[count($arrIfStack) - 1];
607607

608-
if (strncmp($strTag, '{if', 3) === 0)
608+
if (strncmp($strTag, '{if ', 4) === 0)
609609
{
610610
$blnExpression = $evaluateExpression(substr($strTag, 4, -1));
611611
$arrStack[] = $blnCurrent && $blnExpression;
612612
$arrIfStack[] = $blnExpression;
613613
}
614-
elseif (strncmp($strTag, '{elseif', 7) === 0)
614+
elseif (strncmp($strTag, '{elseif ', 8) === 0)
615615
{
616616
$blnExpression = $evaluateExpression(substr($strTag, 8, -1));
617617
array_pop($arrStack);

0 commit comments

Comments
 (0)