Bug #21467
closedtweak for t3lib_div::locationHeaderUrl()
0%
Description
A bug in an extension made me have a look at locationHeaderUrl($path) in t3lib_div. And I think there is room for a little improvement.
If the the function is called with a path that is a relative URL this is feed directly to php parse_url() function even though the output from this is not needed in case of a relative URL.
Furthermore the documentation for parse_url() states: "Note: This function doesn't work with relative URLs." even though it actually does, but should it suddenly start working according to the documentation it will become a problem.
I've made a patch that makes the check for relative URL prior to calling parse_url() and also have also included a call to devLog with an error messsage if the URL is seriously malformed and causes parse_url() to emit a E_WARNING.
(issue imported from #M12479)
Files
Updated by Alexander Opitz over 11 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0)
As this report is very old, is the handling in newer TYPO3 CMS Versions (like 6.0/6.1) more like you expect it?
Updated by Alexander Opitz about 11 years ago
- Status changed from Needs Feedback to Closed
- Is Regression set to No
No feedback for over 90 days.