Issue Bug Closed

#80177Update Extension List - Could not access remote resource https://repositories.typo3.org/mirrors.xml.gz.

Thomas Nowak 03/07/17, 17:20 updated 08/28/17, 10:38

Description

When I try to update the Extension List I will get the error message “Could not access remote resource https://repositories.typo3.org/mirrors.xml.gz.”

I have tried all combinations of

$TYPO3_CONF_VARS[‘SYS’][‘curlUse’] = 0 | 1
$TYPO3_CONF_VARS[‘HTTP’][‘adapter’] = socket| curl
$TYPO3_CONF_VARS[‘HTTP’][‘ssl_verify_peer’] = 0|1
$TYPO3_CONF_VARS[‘HTTP’][‘ssl_cafile’] = /etc/ssl/cert.pem

without any success.

After that i have looked to typo3/sysext/core/Classes/utility/GeneralUtility.php to debug this issues:

I have found some problems in the Methode getURL:

1.) When $TYPO3_CONF_VARS[‘SYS’][‘curlUse’] is 1 curl will be used [‘HTTP’][‘adapter’] is not checked

 if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer']) {
                curl_setopt($ch, CURLOPT_PROXY, $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer']);
                curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, (bool)$GLOBALS['TYPO3_CONF_VARS']['HTTP']['ssl_verify_host']);
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (bool)$GLOBALS['TYPO3_CONF_VARS']['HTTP']['ssl_verify_peer']);
                if ($GLOBALS['TYPO3_CONF_VARS']['HTTP']['ssl_verify_peer']) {
                    if ($GLOBALS['TYPO3_CONF_VARS']['HTTP']['ssl_cafile']) {

                        curl_setopt($ch, CURLOPT_CAINFO, $GLOBALS['TYPO3_CONF_VARS']['HTTP']['ssl_cafile']);
                    }

The options [‘HTTP’][‘ssl_verify_peer’] and [‘HTTP’][‘ssl_cafile’] will only used if a Proxyserver is used!
This shoud done also when no proxyserver is used!

2.) if [‘SYS’][‘curlUse’] is set to false and getUrl is called with $includeHeader = 0 ( like in this case )

Typo3 tries to load the file not as excepted over the socket, but over file_get_contents, which fails allow_url_fopen is set to off for security reaons without any hints.

Reviews 0

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