[TYPO3-core] RFC: #15280: felogin redirect doesn't work anymore after update to latest releases (4.2x - 4.4.x)

Jigal van Hemert jigal at xs4all.nl
Mon Aug 2 10:42:37 CEST 2010


Helmut Hummel wrote:
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=15280

-1 by reading on:

919» » » $localDomains·=·$GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
920» » » » 'domainName',
921» » » » 'sys_domain',
922» » » » $this->cObj->enableFields('sys_domain')
923» » » );

enableFields() returns an extra part of the WHERE clause and this starts 
with ' AND'.
exec_SELECTgetRows() (and other functions in t3lib_db) will  concatenate 
this to ' WHERE ', resulting in:
... WHERE AND ....
This will result in a syntax error in MySQL.

The original line with
'1=1' . $this->cObj->enableFields('sys_domain')
will work correctly.

A few questions:

(1) Can you supply a "How to test" recipe?

(2) Shouldn't we use t3lib_div::isFirstPartofStr() according to CGL?
949»   »   »   » 
//·If·the·relative·URL·starts·with·a·slash,·we·need·to·check·if·it's·within·the·current·site·path 

950»   »   » 
return·(strpos($parsedUrl['path'],·'/')·!==·0·||·strpos($parsedUrl['path'],·t3lib_div::getIndpEnv('TYPO3_SITE_PATH'))·===·0);

(3) The following check works, but it takes some time to figure out the 
meaning:
928»   »   »   »   » 
if·(stripos($host.·$path·.·'/',·rtrim($domainName,·'/')·.·'/')·===·0)·{ 

A more readable approach to compare could be a substr-part; this is not 
very essential to this patch

-- 
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh


More information about the TYPO3-team-core mailing list