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

Commit 977f7ff

Browse files
committed
Merge branch 'hotfix/3.5.28'
2 parents a445566 + 10bfe4f commit 977f7ff

File tree

17 files changed

+68
-18
lines changed

17 files changed

+68
-18
lines changed

assets/mootools/simplemodal/1.2/css/simplemodal-uncompressed.css

+10
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@
7373
bottom: 40px;
7474
-webkit-overflow-scrolling: touch;
7575
}
76+
/* PATCH: see #8708 */
77+
.ios .simple-modal:before {
78+
content: '';
79+
position: absolute;
80+
top: 0;
81+
left: 0;
82+
width: 1px;
83+
height: calc(100% + 1px);
84+
pointer-events: none;
85+
}
7686
.simple-modal .simple-modal-header {
7787
padding: 5px 15px;
7888
margin: 0;

assets/mootools/simplemodal/1.2/css/simplemodal.css

+1-1
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', '27');
16+
define('BUILD', '28');
1717
define('LONG_TERM_SUPPORT', true);
1818

1919

system/docs/CHANGELOG.md

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

4+
Version 3.5.28 (2017-07-12)
5+
---------------------------
6+
7+
### Fixed
8+
Prevent arbitrary PHP file inclusions in the back end (see CVE-2017-10993).
9+
10+
### Fixed
11+
Improve the accessibility of the CAPTCHA widget (see #8709).
12+
13+
### Fixed
14+
Fixed the iOS scrolling bug in the simple modal script (see #8708).
15+
16+
### Fixed
17+
Correctly cache the unique keys in the SQL cache (see #8712).
18+
19+
420
Version 3.5.27 (2017-04-25)
521
---------------------------
622

system/modules/core/controllers/FrontendCron.php

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ public function run()
7474
}
7575
}
7676

77+
// Load the default language file (see #8719)
78+
\System::loadLanguageFile('default');
79+
7780
// Run the jobs
7881
foreach ($arrIntervals as $strInterval)
7982
{

system/modules/core/dca/tl_files.php

+16-4
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,9 @@ public function cutFile($row, $href, $label, $title, $icon, $attributes)
571571
*/
572572
public function deleteFile($row, $href, $label, $title, $icon, $attributes)
573573
{
574-
if (is_dir(TL_ROOT . '/' . $row['id']) && count(scan(TL_ROOT . '/' . $row['id'])) > 0)
574+
$path = TL_ROOT . '/' . urldecode($row['id']);
575+
576+
if (is_dir($path) && count(scan($path)) > 0)
575577
{
576578
return $this->User->hasAccess('f4', 'fop') ? '<a href="'.$this->addToUrl($href.'&amp;id='.$row['id']).'" title="'.specialchars($title, false, true).'"'.$attributes.'>'.Image::getHtml($icon, $label).'</a> ' : Image::getHtml(preg_replace('/\.gif$/i', '_.gif', $icon)).' ';
577579
}
@@ -653,13 +655,23 @@ public function showFile($row, $href, $label, $title, $icon, $attributes)
653655
*/
654656
public function protectFolder(DataContainer $dc)
655657
{
656-
$count = 0;
657658
$strPath = $dc->id;
658659

659660
// Check whether the temporary name has been replaced already (see #6432)
660-
if (Input::post('name') && ($strNewPath = str_replace('__new__', Input::post('name'), $strPath, $count)) && $count > 0 && is_dir(TL_ROOT . '/' . $strNewPath))
661+
if (Input::post('name'))
661662
{
662-
$strPath = $strNewPath;
663+
if (Validator::isInsecurePath(Input::post('name')))
664+
{
665+
throw new RuntimeException('Invalid file or folder name ' . Input::post('name'));
666+
}
667+
668+
$count = 0;
669+
$strName = basename($strPath);
670+
671+
if (($strNewPath = str_replace($strName, Input::post('name'), $strPath, $count)) && $count > 0 && is_dir(TL_ROOT . '/' . $strNewPath))
672+
{
673+
$strPath = $strNewPath;
674+
}
663675
}
664676

665677
// Only show for folders (see #5660)

system/modules/core/dca/tl_settings.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
(
313313
'label' => &$GLOBALS['TL_LANG']['tl_settings']['maxImageWidth'],
314314
'inputType' => 'text',
315-
'eval' => array('rgxp'=>'natural', 'nospace'=>true, 'tl_class'=>'w50')
315+
'eval' => array('mandatory'=>true, 'rgxp'=>'natural', 'nospace'=>true, 'tl_class'=>'w50')
316316
),
317317
'jpgQuality' => array
318318
(

system/modules/core/forms/FormCaptcha.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,11 @@ public function generateLabel()
200200
*/
201201
public function generate()
202202
{
203-
return sprintf('<input type="text" name="%s" id="ctrl_%s" class="captcha mandatory%s" value=""%s%s',
203+
return sprintf('<input type="text" name="%s" id="ctrl_%s" class="captcha mandatory%s" value="" aria-describedby="captcha_text_%s"%s%s',
204204
$this->strCaptchaKey,
205205
$this->strId,
206206
(($this->strClass != '') ? ' ' . $this->strClass : ''),
207+
$this->strId,
207208
$this->getAttributes(),
208209
$this->strTagEnding) . $this->addSubmit();
209210
}
@@ -216,7 +217,8 @@ public function generate()
216217
*/
217218
public function generateQuestion()
218219
{
219-
return sprintf('<span class="captcha_text%s">%s</span>',
220+
return sprintf('<span id="captcha_text_%s" class="captcha_text%s">%s</span>',
221+
$this->strId,
220222
(($this->strClass != '') ? ' ' . $this->strClass : ''),
221223
$this->getQuestion());
222224
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@
252252
<source>Maximum front end width</source>
253253
</trans-unit>
254254
<trans-unit id="tl_settings.maxImageWidth.1">
255-
<source>If the width of an image or movie exceeds this value, it will be adjusted automatically.</source>
255+
<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>
256256
</trans-unit>
257257
<trans-unit id="tl_settings.jpgQuality.0">
258258
<source>JPG thumbnail quality</source>

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

+1
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ public function generateDcaExtracts()
762762
$objFile->append(sprintf("\$this->arrMeta = %s;\n", var_export($objExtract->getMeta(), true)));
763763
$objFile->append(sprintf("\$this->arrFields = %s;\n", var_export($objExtract->getFields(), true)));
764764
$objFile->append(sprintf("\$this->arrOrderFields = %s;\n", var_export($objExtract->getOrderFields(), true)));
765+
$objFile->append(sprintf("\$this->arrUniqueFields = %s;\n", var_export($objExtract->getUniqueFields(), true)));
765766
$objFile->append(sprintf("\$this->arrKeys = %s;\n", var_export($objExtract->getKeys(), true)));
766767
$objFile->append(sprintf("\$this->arrRelations = %s;\n", var_export($objExtract->getRelations(), true)));
767768

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

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public function __construct($strTable)
4848
throw new \Exception('The table name must not be empty');
4949
}
5050

51+
if (\Validator::isInsecurePath($strTable))
52+
{
53+
throw new \InvalidArgumentException('The table name contains invalid characters');
54+
}
55+
5156
parent::__construct();
5257

5358
$this->strTable = $strTable;

system/modules/core/templates/backend/be_login.html5

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44

55
<meta charset="<?= $this->charset ?>">
6-
<title><?= $this->title ?> - Contao Open Source CMS <?= VERSION ?></title>
6+
<title><?= $this->title ?> - Contao Open Source CMS</title>
77
<base href="<?= $this->base ?>">
88
<meta name="generator" content="Contao Open Source CMS">
99
<meta name="viewport" content="width=device-width,initial-scale=1.0">
@@ -40,7 +40,7 @@
4040
<![endif]-->
4141

4242
<div id="header">
43-
<h1>Contao Open Source CMS <?= VERSION ?></h1>
43+
<h1>Contao Open Source CMS</h1>
4444
</div>
4545

4646
<div id="container">

system/modules/core/templates/forms/form_captcha.html5

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<p class="error"><?= $this->getErrorAsString() ?></p>
1414
<?php endif; ?>
1515

16-
<input type="text" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="captcha mandatory<?php if ($this->class) echo ' ' . $this->class; ?>" value=""<?= $this->getAttributes() ?>>
17-
<span class="captcha_text<?php if ($this->class) echo ' ' . $this->class; ?>"><?= $this->getQuestion() ?></span>
16+
<input type="text" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="captcha mandatory<?php if ($this->class) echo ' ' . $this->class; ?>" value="" aria-describedby="captcha_text_<?= $this->id ?>"<?= $this->getAttributes() ?>>
17+
<span id="captcha_text_<?= $this->id ?>" class="captcha_text<?php if ($this->class) echo ' ' . $this->class; ?>"><?= $this->getQuestion() ?></span>
1818

1919
<?php if ($this->addSubmit): ?>
2020
<input type="submit" id="ctrl_<?= $this->id ?>_submit" class="submit" value="<?= $this->slabel ?>">

system/modules/core/templates/forms/form_captcha.xhtml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<p class="error"><?= $this->getErrorAsString() ?></p>
1414
<?php endif; ?>
1515

16-
<input type="text" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="captcha mandatory<?php if ($this->class) echo ' ' . $this->class; ?>" value=""<?= $this->getAttributes() ?> />
17-
<span class="captcha_text<?php if ($this->class) echo ' ' . $this->class; ?>"><?= $this->getQuestion() ?></span>
16+
<input type="text" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="captcha mandatory<?php if ($this->class) echo ' ' . $this->class; ?>" value="" aria-describedby="captcha_text_<?= $this->id ?>"<?= $this->getAttributes() ?> />
17+
<span id="captcha_text_<?= $this->id ?>" class="captcha_text<?php if ($this->class) echo ' ' . $this->class; ?>"><?= $this->getQuestion() ?></span>
1818

1919
<?php if ($this->addSubmit): ?>
2020
<input type="submit" id="ctrl_<?= $this->id ?>_submit" class="submit" value="<?= $this->slabel ?>" />
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
<input type="hidden" name="<?= $this->name ?>" value="<?= $this->value ?>">
2+
<input type="hidden" name="<?= $this->name ?>" value="<?= specialchars($this->value) ?>">
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
<input type="hidden" name="<?= $this->name ?>" value="<?= $this->value ?>" />
2+
<input type="hidden" name="<?= $this->name ?>" value="<?= specialchars($this->value) ?>" />

system/modules/repository/classes/RepositorySettings.php

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
// valid core versions in descending order
1919
define('REPOSITORY_COREVERSIONS',
20+
'30050289,30050289;'. // 3.5.28
2021
'30050279,30050279;'. // 3.5.27
2122
'30050269,30050269;'. // 3.5.26
2223
'30050259,30050259;'. // 3.5.25

0 commit comments

Comments
 (0)