Bug #10258

baseUri is added on external links

Added by Michael Feinbier over 2 years ago. Updated about 2 years ago.

Status:Resolved Start date:2010-10-14
Priority:Should have Due date:
Assignee:Sebastian Kurfuerst % Done:

100%

Category:Extbase: MVC
Target version:Extbase 1.3
Has patch:No Tags:
Votes: 1 (View)

Description

Hi Everybody,

I encountered a bug in Tx_Extbase_MVC_Controller_AbstractController::addBaseUriIfNecessary. If I want to redirect to an external URI via redirectToURI() the base URL is added by mistake.
In my opinion the method addBaseUriIfNecessary does not behave as it should.
When is the baseUri needed? - It is needed when the uri is relative but at the moment it compares if the uri to redirect contains the base uri. Thus it is not possible to link to external URIs.

Solution: The method addBaseUriIfNecessary only adds the baseUri if the $uri does not start with http:// or https://>

The attached patch fixes this behaviour and provides the corresponding unit-test

extbase-baseuri.patch - Unit Test AND patch (1.7 kB) Michael Feinbier, 2010-10-14 16:55

Associated revisions

Revision 595352ae
Added by Sebastian Kurfuerst about 2 years ago

[+BUGFIX] baseUri is added on external links

On a redirect to an external URI via redirectToURI(),
the base URL is added by mistake.

Thanks to Michael Feinbier for this fix!

Change-Id: I641d5bd0de7ede81bf9ed6568290d554f9580138
Resolves: #10258

Revision 0c576e4b
Added by Sebastian Kurfuerst about 2 years ago

[+BUGFIX] baseUri is added on external links

On a redirect to an external URI via redirectToURI(),
the base URL is added by mistake.

Thanks to Michael Feinbier for this fix!

Change-Id: I7d817eba25e10ff1300cd3276c104f54fb6b4e26
Resolves: #10258

History

Updated by Sebastian Kurfuerst over 2 years ago

  • Category set to Extbase: MVC

Updated by Marc Bastian Heinrichs over 2 years ago

  • Assignee set to Marc Bastian Heinrichs
  • Target version set to Extbase 1.4

Updated by Mr. Hudson about 2 years ago

Patch set 1 of change I641d5bd0de7ede81bf9ed6568290d554f9580138 has been pushed to the review server.
It is available at http://review.typo3.org/2379

Updated by Sebastian Kurfuerst about 2 years ago

  • Status changed from New to Resolved
  • Assignee changed from Marc Bastian Heinrichs to Sebastian Kurfuerst
  • % Done changed from 90 to 100
  • Has patch set to No

Updated by Bastian Waidelich about 2 years ago

  • Target version changed from Extbase 1.4 to Extbase 1.3

Also available in: Atom PDF