Update auf Version 4.5.6

Bugfix jumpurl

Nach dem Update gab es Probleme mit jumpurl bei Konfiguration mit jumpurl.secure = 1. Es kommt bei einem Download Link der Fehler "Calculated juHash did not match the submitted juHash". Die einzige Lösung die ich gefunden habe war, die relevante Methode mit der aus der Vorgängerversion zu ersetzen. Diese findet sich in der Datei typo3/sysext/cms/tslib/class.tslib_content.php. Die Methode locDataJU in Zeile 4758 lautet folgendermassen:

function locDataJU($jumpUrl,$conf)    {
    $fI = pathinfo($jumpUrl);
    $mimetype='';
    $mimetypeValue = '';
    if ($fI['extension'])    {
        $mimeTypes = t3lib_div::trimExplode(',',$conf['mimeTypes'],1);
        foreach ($mimeTypes as $v) {
            $parts = explode('=',$v,2);
            if (strtolower($fI['extension']) == strtolower(trim($parts[0])))    {
                $mimetypeValue = trim($parts[1]);
                $mimetype = '&mimeType=' . rawurlencode($mimetypeValue);
                break;
            }
        }
    }
    $locationData = $GLOBALS['TSFE']->id.':'.$this->currentRecord;
    $rec='&locationData='.rawurlencode($locationData);
    $hArr = array(
        $jumpUrl, $locationData, $mimetypeValue
    );
    $juHash = '&juHash=' . t3lib_div::hmac(serialize($hArr));
    return '&juSecure=1'.$mimetype.$rec.$juHash;
}

Hier ist wohl ein Bugfix eingearbeitet mit $mimetypeValue = ''; allerdings wie gesagt funktioniert es nicht. Ich habe es mit der Funktion der Version 4.4.2 ersetzt. Diese lautet:

// rsys: bugfix "jumpurl Secure: Calculated juHash did not match the submitted juHash."
// function is from 4.4.2
function locDataJU($jumpUrl,$conf)    {
    $fI = pathinfo($jumpUrl);
    $mimetype='';
    if ($fI['extension'])    {
        $mimeTypes = t3lib_div::trimExplode(',',$conf['mimeTypes'],1);
        foreach ($mimeTypes as $v) {
            $parts = explode('=',$v,2);
            if (strtolower($fI['extension']) == strtolower(trim($parts[0])))    {
                $mimetypeValue = trim($parts[1]);
                $mimetype = '&mimeType=' . rawurlencode($mimetypeValue);
                break;
            }
        }
    }
    $locationData = $GLOBALS['TSFE']->id.':'.$this->currentRecord;
    $rec='&locationData='.rawurlencode($locationData);
    $hArr = array(
        $jumpUrl,
        $locationData,
        $mimetypeValue,
        $GLOBALS['TSFE']->TYPO3_CONF_VARS['SYS']['encryptionKey']
    );
    $juHash='&juHash='.t3lib_div::shortMD5(serialize($hArr));
    return '&juSecure=1'.$mimetype.$rec.$juHash;
}

Erstellt: 10/2011| Geändert: 10/2015