Issue Bug Closed

#75915Unsafe removing of empty redirect urls

Sven Wappler 04/25/16, 20:05 updated 10/02/18, 11:13

Description

In class FrontendLoginController in method processRedirect in line 749 an implode and explode is used with a delimiter sign (,) which can be part of the redirect url. This can lead to faulty redirects. My suggestion: Use a sign which cannot be part of an url. Or just maybe the php function array_filter, which removes empty array values.

Problematic location:

// Remove empty values
if (!empty($redirect_url)) {
   return GeneralUtility::trimExplode(',', implode(',', $redirect_url), true);
}

Example:

$redirect_url maybe can be:

$redirect_url = array('http://domain/test/123,343');

‘123,343’ is a GET parameter.
This would redirect to http://domain/test/123 or 343

Reviews 2