Issue Bug Rejected

#80888GeneralUtility::removeXSS() doesn't respect base64 encoded links

Alex Kellner 04/19/17, 09:54 updated 01/11/18, 11:46

Description

In some projects we’re using GeneralUtility::removeXSS() for user variables.
It turned out, that this is a failure. Base64 encoded links are not disarmed.

Example test.php in TYPO3 Webroot:

<?php
require __DIR__ . '/vendor/autoload.php';

$string = 'data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K';
echo '<a href="' . $string . '">1</a>';
echo \TYPO3\CMS\Core\Utility\GeneralUtility::removeXSS('<a href="' . $string . '">2</a>');

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.