OpenConext / OpenConext-engineblock

OpenConext SAML 2.0 IdP/SP Gateway
14 stars 22 forks source link

EB 4.4 fails on transparent endpoints #167

Closed thijskh closed 9 years ago

thijskh commented 9 years ago

When attempting to log in to an SP which uses the transparent metadata, accessing the endpoint that ends in the md5sum produces warnings (or, if display_errors is off, leads to a non-functional WAYF screen).

Warning: array_keys() expects parameter 1 to be array, null given in /var/opt/openconext/OpenConext-engineblock-4.4.8/library/EngineBlock/Corto/ProxyServer.php on line 332 Warning: Invalid argument supplied for foreach() in /var/opt/openconext/OpenConext-engineblock-4.4.8/library/EngineBlock/Corto/ProxyServer.php on line 334 Warning: Invalid argument supplied for foreach() in /var/opt/openconext/OpenConext-engineblock-4.4.8/library/EngineBlock/Corto/ProxyServer.php on line 343

This is most likely due to the setRemoteIdpMd5() function still trying to use the removed _entities attribute.

    public function setRemoteIdpMd5($remoteIdPMd5)
    {
        $remoteEntityIds = array_keys($this->_entities['remote']);

        foreach ($remoteEntityIds as $remoteEntityId) {
            if (md5($remoteEntityId) === $remoteIdPMd5) {
thijskh commented 9 years ago

The code that triggers the warning on line 343 should be removed instead of fixed (tracked in #168).