Project

General

Profile

Bug #31967

Updated by Alexander Opitz over 9 years ago


 In case of a special formed HTTP-request the return value of $this->cObj->typoLink_URL() is wrong. 
 This occurs in a basic TYPO3 4.5.7 installation. 

 Expected return value (correct): 
 https://domain.tld/index.php?id=5 

 Delivered return value (wrong): 
 https://domain.tld:80/index.php?id=5 


 Reproduction steps: 

 1. Create a new page 
 2. Edit the page properties and set "Use Protocol" to "https://" 
 3. Create a fe-plugin and put it in any other page (create one if necessary) with "Use Protocol" set to "http://" (or "Default") 
 4. Put this php code inside the fe-plugin: 

	 echo $this->cObj->typoLink_URL(array('parameter' => 5)); 
	 exit; 

 The id 5 must be replaced by the id of the page created in step 1 of course. 

 5. Access the page containing the fe-plugin with your browser through the frontend 

 The result is the expected result until this step because the HTTP-request looks somewhat like this: 
	
	 GET /index.php?id=7 HTTP/1.1 
	 Host: domain.tld 
	 User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0 
	 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 
	 Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 
	 Accept-Encoding: gzip, deflate 
	 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 
	 Connection: keep-alive 

 But if the request gets changed in this form (only the port gets defined also, which is legitimated by: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23): 
	
	 GET /index.php?id=7 HTTP/1.1 
	 Host: domain.tld:80 
	 User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0 
	 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 
	 Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 
	 Accept-Encoding: gzip, deflate 
	 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 
	 Connection: keep-alive 

 Then the returned value includes the same port definition as in the request. But since "http" is changed into "https" the port must be omitted or changed into 443. 

 This behaviour can be tested by using e.g. the "Live HTTP headers" Plugin for Firefox. 

Back