Skip to content

Commit 0f7ac39

Browse files
author
kodiakhq
committed
deploy: 32e9fbc
1 parent 4369909 commit 0f7ac39

File tree

7 files changed

+182
-124
lines changed

7 files changed

+182
-124
lines changed

classes/rex-article.html

Lines changed: 54 additions & 38 deletions
Large diffs are not rendered by default.

classes/rex-category.html

Lines changed: 50 additions & 34 deletions
Large diffs are not rendered by default.

classes/rex-structure-element.html

Lines changed: 72 additions & 40 deletions
Large diffs are not rendered by default.

files/redaxo-main/redaxo/src/addons/mediapool/lib/service_media.php.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use voku\helper\AntiXSS;
3+
use enshrined\svgSanitize\Sanitizer;
44

55
/**
66
* @package redaxo\mediapool
@@ -389,14 +389,7 @@ final class rex_media_service
389389

390390
$content = rex_type::notNull(rex_file::get($path));
391391

392-
$antiXss = new AntiXSS();
393-
$antiXss->removeNeverAllowedRegex(['&lt;!--', '&lt;!--$1--&gt;']);
394-
$antiXss->removeEvilAttributes(['style', 'xlink:href']);
395-
$antiXss->removeEvilHtmlTags(['style', 'svg', 'title']);
396-
397-
$content = $antiXss->xss_clean($content);
398-
$content = preg_replace('/^\s*&lt;\?xml(.*?)\?&gt;/', '<?xml$1?>', $content);
399-
$content = preg_replace('/&lt;!DOCTYPE(.*?)>/', '<!DOCTYPE$1>', $content);
392+
$content = (new Sanitizer())->sanitize($content);
400393

401394
rex_file::put($path, $content);
402395
}

files/redaxo-main/redaxo/src/addons/structure/lib/structure_element.php.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ abstract class rex_structure_element
8080
* Returns Object Value.
8181
*
8282
* @param string $value
83-
*
8483
* @return string|int|null
84+
* @psalm-taint-source input
8585
*/
8686
public function getValue($value)
8787
{
@@ -334,6 +334,7 @@ abstract class rex_structure_element
334334
* Returns the name of the article.
335335
*
336336
* @return string
337+
* @psalm-taint-source input
337338
*/
338339
public function getName()
339340
{

files/redaxo-main/redaxo/src/addons/structure/plugins/content/pages/content.php.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ $context = new rex_context([
7272
]);
7373

7474
// ----- Titel anzeigen
75-
echo rex_view::title(rex_i18n::msg('content') . ': ' . $OOArt->getName(), '');
75+
echo rex_view::title(rex_i18n::msg('content') . ': ' . rex_escape($OOArt->getName()), '');
7676

7777
// ----- Languages
7878
echo rex_view::clangSwitchAsButtons($context);

files/redaxo-main/redaxo/src/core/boot.php.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ require_once rex_path::core('functions/function_rex_globals.php');
9292
require_once rex_path::core('functions/function_rex_other.php');
9393

9494
// ----------------- VERSION
95-
rex::setProperty('version', '5.18.1');
95+
rex::setProperty('version', '5.18.2');
9696

9797
$cacheFile = rex_path::coreCache('config.yml.cache');
9898
$configFile = rex_path::coreData('config.yml');

0 commit comments

Comments
 (0)