Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

respository.wsdl via HTTPS - Proxy Authentication not working (HTTP 407) #7553

Closed
cashewkernchen opened this issue Jan 8, 2015 · 9 comments

Comments

@cashewkernchen
Copy link

Hi,
seems like Contao does not pass on the Proxy Credentials when requesting the respository.wsdl via HTTPS (https://contao.org/services/repository.wsdl).

I tried this via wget and curl on the server which worked fine and the credentials were passed to the proxy for authentication.
When trying this via the webinterface it raises to following error:

Warning: SoapClient::SoapClient(https://contao.org/services/repository.wsdl): failed to open stream: Cannot connect to HTTPS server through proxy in system/modules/repository/classes/RepositoryBackendModule.php on line 124 #0 [internal function]: __error(2, 'SoapClient::Soa...', '/var/www/html/m...', 124, Array)

Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "https://contao.org/services/repository.wsdl" in system/modules/repository/classes/RepositoryBackendModule.php on line 124 #0 [internal function]: __error(2, 'SoapClient::Soa...', '/var/www/html/m...', 124, Array) 
#1 system/modules/repository/classes/RepositoryBackendModule.php(124): SoapClient->SoapClient('https://contao....', Array)

The SoapClient worked well with HTTP but since we changed this to HTTPS it is no longer working.

Requests in the Proxy look like this:

Via Contao Webinterface:

[8/Jan/2015] "" "$serverip" **407** "CONNECT contao.org:443 HTTP/1.1" "  "

Via wget:

[8/Jan/2015] "$proxyuser" "$serverip" 200 "CONNECT contao.org:443 HTTP/1.1" "Wget/1.12 (linux-gnu)"

Via curl:

[8/Jan/2015] "$proxyuser" "$serverip" 200 "CONNECT contao.org:443 HTTP/1.1" "curl/7.19.7 (linux-gnu)"

proxy_url is set in localconfig.php:

$GLOBALS['TL_CONFIG']['proxy_url'] = 'http://$proxyuser:$proxyuserpw@$proxyurl:8080';

and should therefore be stripped in RepositoryBackendModule.php.

Contao version is: 3.2.16
PHP version: 5.3.3 (with modules: bz2,calendar,Core,ctype,curl,date,dom,ereg,exif,fileinfo,filter,ftp,gd,gettext,gmp,hash,iconv,json,ldap,libxml,mbstring,mcrypt,mysql,mysqli,openssl,pcntl,pcre,PDO,pdo_mysql,pdo_sqlite,Phar,readline,Reflection,session,shmop,SimpleXML,soap,sockets,SPL,sqlite3,standard,tokenizer,wddx,xml,xmlreader,xmlwriter,xsl,zip,zlib)

Let me know if you need further information.

@BugBuster1701
Copy link
Contributor

It could be that this is a problem in the extension "proxy".
I can not test it right now. For this I must first set up a proxy with authentication.

@cashewkernchen
Copy link
Author

Okay I see, just let me know whenever I can help you with testing that (since I have got my proxy authentication up) (:

@BugBuster1701
Copy link
Contributor

Mit Squid3 getestet
auth_param basic program /.../basic_ncsa_auth /etc/squid3/passwd
funktioniert bei mir alles.

@cashewkernchen
Copy link
Author

Das ist ja schonmal gut. Gibts noch Konfigurationsmöglichkeiten in Contao für Proxyauthentifizerung, die ich verdreht/übersehen haben kann, abgesehen von den beiden Werten in localconfig.php?

$GLOBALS['TL_CONFIG']['proxy_url']='http://$proxyuser:$proxyuserpw@$proxyurl:8080';
$GLOBALS['TL_CONFIG']['useProxy']="true";

@BugBuster1701
Copy link
Contributor

Eingestellt werden diese Werte über
System->Einstellungen->Proxy-Einstellungen (abgehende Verbindungen)

Meine Zeilen in der localconfig sind beispielsweise wie folgt:

$GLOBALS['TL_CONFIG']['useProxy'] = true;
$GLOBALS['TL_CONFIG']['proxy_url'] = 'http://meinlogin:meinpw@127.0.0.1:3128';
$GLOBALS['TL_CONFIG']['proxy_local'] = '192.168.17.';

@cashewkernchen
Copy link
Author

Danke!
Mit php 5.3.3 getestet?
Hab gerade noch das hier gefunden: https://bugs.php.net/bug.php?id=50489&edit=3
Werd morgen mal den Fix einspielen und erneut testen.

@BugBuster1701
Copy link
Contributor

Mit PHP 5.5.9

@BugBuster1701
Copy link
Contributor

Im übrigen, ab Contao 3.4.0 ist PHP 5.3.7 oder höher nötig.

@cashewkernchen
Copy link
Author

Wir nutzen Contao 3.2.16 (Laut Webseite LTS bis Juni 2015) mit der PHP Version 5.3.3., was nach Spezifikation noch supportet ist.
Ein PHP Update hat das Problem gelöst, einspielen des PHP Fix für den PHP Bug #50489 vermutlich auch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants