Bug #56927

Regression: baseUri for LocalDriver is invalid for fallback storage

Added by Alexander Stehlik over 1 year ago. Updated over 1 year ago.

Status:Resolved Start date:2014-03-15
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:File Abstraction Layer (FAL) Spent time: -
Target version:-
TYPO3 Version:6.2 Is Regression:Yes
PHP Version:5.4 Sprint Focus:
Complexity:

Description

The baseUri in the LocalDriver contains a leading slash, when the absoluteBasePath equals PATH_site.

This is the case for the 0-storage (the fallback storage for non FAL file paths).

If the baseUri contains a leading slash the public URLs will contain two slashes at the beginning which browsers interpret as a schema-less URL and try to lookup the first part of the file path as hostname.


Related issues

related to Core - Task #36420: Filemount in local file system (not on webserver) leads t... Resolved 2012-04-22
related to Core - Bug #56802: f:image returns wrong image path if absRefPrefix is set Resolved 2014-03-12

Associated revisions

Revision 2806f70e
Added by Steffen Ritter over 1 year ago

[BUGFIX] PublicURL calculation for storage 0 is wrong

Since the refactoring of the publicURL Feature and the possibility to
link to files via jump-scripts the generation of publicUrls for files
in storage zero is broken due to the fact that every relative base-path
for this URL is appended with a slash.

If the base-path has been empty (like for storage 0), appending a slash
makes it absolute.

This patch changes the behaviour to only append a slash on non-empty
paths.

Releases: 6.2
Resolves: #56927
Change-Id: I14e8bae0b64ed8dc537a5edbf57d9dce6ddf0932
Reviewed-on: https://review.typo3.org/28395
Reviewed-by: Alexander Stehlik
Tested-by: Alexander Stehlik
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

History

#1 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28408

#2 Updated by Gerrit Code Review over 1 year ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28395

#3 Updated by Steffen Ritter over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF