Bug #52173

Wrong storage is selected if file is outside of available storages

Added by Markus Klein almost 2 years ago. Updated over 1 year ago.

Status:Resolved Start date:2013-09-22
Priority:Must have Due date:
Assigned To:- % Done:

100%

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

Description

findBestMatchingStorageByLocalPath() does not check whether a requested file actually exists in the selected storage.
It selects the "best matching storage", but this might not contain the actual file if it is requested from a path outside of the available storages.

Example:

page.10 = IMAGE
page.10.file = fileadmin/images/dummy.png

Configured storages:
  • fileadmin/user_upload/
  • uploads/

Result:
Storage fileadmin/user_upload/ is selected, since it "best matches" with "fileadmin".


Related issues

blocked by Core - Feature #45498: Find best-matching local storage instead of default-storage Resolved 2013-02-15

Associated revisions

Revision 14b4edb7
Added by Ernesto Baschny almost 2 years ago

[BUGFIX] Correct storage selection (common prefixes)

If there is a local storage "uploads/test/" and a requested file
is in "uploads/other/file.txt", the storage matching will not
consider this storage for this file anymore, although they share a
common prefix, but will use a correct matching storage (e.g. 0).

Releases: 6.2, 6.1, 6.0
Resolves: #52173
Change-Id: Id14ffd6620554c086b6e77dca285ade8dee39ab2
Reviewed-on: https://review.typo3.org/23966
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

Revision 7151ce06
Added by Ernesto Baschny almost 2 years ago

[BUGFIX] Correct storage selection (common prefixes)

If there is a local storage "uploads/test/" and a requested file
is in "uploads/other/file.txt", the storage matching will not
consider this storage for this file anymore, although they share a
common prefix, but will use a correct matching storage (e.g. 0).

Releases: 6.2, 6.1, 6.0
Resolves: #52173
Change-Id: Id14ffd6620554c086b6e77dca285ade8dee39ab2
Reviewed-on: https://review.typo3.org/23994
Reviewed-by: Stefan Neufeind
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring

Revision 3f53e6b4
Added by Ernesto Baschny almost 2 years ago

[BUGFIX] Correct storage selection (common prefixes)

If there is a local storage "uploads/test/" and a requested file
is in "uploads/other/file.txt", the storage matching will not
consider this storage for this file anymore, although they share a
common prefix, but will use a correct matching storage (e.g. 0).

Releases: 6.2, 6.1, 6.0
Resolves: #52173
Change-Id: Id14ffd6620554c086b6e77dca285ade8dee39ab2
Reviewed-on: https://review.typo3.org/23993
Reviewed-by: Stefan Neufeind
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring

Revision 5582b8af
Added by Ernesto Baschny over 1 year ago

[BUGFIX] Correct storage selection (follow-up)

The new matching did not consider Windows paths names as the
previous version did. Using PathUtility is safer.

Releases: 6.2, 6.1, 6.0
Resolves: #52173
Change-Id: Ib0454a468bb93f5baab9677ffafc86efd0f1ae27
Reviewed-on: https://review.typo3.org/24071
Reviewed-by: Wouter Wolters
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

Revision 093d7ac9
Added by Ernesto Baschny over 1 year ago

[BUGFIX] Correct storage selection (follow-up)

The new matching did not consider Windows paths names as the
previous version did. Using PathUtility is safer.

Releases: 6.2, 6.1, 6.0
Resolves: #52173
Change-Id: Ib0454a468bb93f5baab9677ffafc86efd0f1ae27
Reviewed-on: https://review.typo3.org/25232
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter

Revision 907d5b15
Added by Ernesto Baschny over 1 year ago

[BUGFIX] Correct storage selection (follow-up)

The new matching did not consider Windows paths names as the
previous version did. Using PathUtility is safer.

Releases: 6.2, 6.1, 6.0
Resolves: #52173
Change-Id: Ib0454a468bb93f5baab9677ffafc86efd0f1ae27
Reviewed-on: https://review.typo3.org/25233
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter

History

#1 Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23966

#2 Updated by Gerrit Code Review almost 2 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23966

#3 Updated by Gerrit Code Review almost 2 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23966

#4 Updated by Gerrit Code Review almost 2 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23966

#5 Updated by Gerrit Code Review almost 2 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23993

#6 Updated by Gerrit Code Review almost 2 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23994

#7 Updated by Ernesto Baschny almost 2 years ago

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

#8 Updated by Gerrit Code Review almost 2 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24071

#9 Updated by Gerrit Code Review over 1 year ago

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

#10 Updated by Gerrit Code Review over 1 year ago

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

#11 Updated by Ernesto Baschny over 1 year ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF