[TYPO3-core] RFC #9474: Integrate OpenID authentication support to TYPO3

Martin Kutschker masi-no at spam-typo3.org
Wed Oct 29 11:41:45 CET 2008


Dmitry Dulepov schrieb:
> Hi!
> 
> This is SVN patch request.
> 
> Type: feature
> 
> Branches: trunk
> 
> BT reference: http://bugs.typo3.org/view.php?id=9474
> 

I've found and fixed an issue. In class.tx_openid_return.php there was a
check for $TYPO3_CONF_VARS['BE']['compressionLevel'] to see if output
buffering should be started (because of possible output compression).
But at this point $TYPO3_CONF_VARS is not available because it's loaded
in init.php. I have therefore removed the check, as init.php will turn
on output buffering anyway *. OTOH I have made also sure that all
buffers are cleared before we redirect.

Unfortunately the diff looks very odd, so here's the function in plain:

public function main() {
	if ($GLOBALS['BE_USER']->user['uid']) {
		while (ob_get_level()>0) {
			@ob_end_clean();
		}
		$backendURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir
. 'backend.php';
		t3lib_div::redirect($backendURL);
	}
}

IMHO we could add loop over the buffers to t3lib_div::redirect();

Furthermore the library spams the log with messages like this:

Successfully fetched '<URL>': GET response code 200

It simply uses the php error_log() mechanism unconditionally. So you
cannot turn this off. Maybe we should patch this to use our own logger
(using a severity of notice).

Masi

* So I am not sure why this file has to start the output_buffer itself.


More information about the TYPO3-team-core mailing list