[TYPO3-core] RFC: #8205: Shortcut ends in parse_url-error

Martin Kutschker martin.kutschker-no at spam-blackbox.net
Mon Jun 16 11:30:11 CEST 2008


Steffen Kamper schrieb:
> Hi,
> 
> This is an SVN patch request.
> 
> Type: Bugfix
> 
> Bugtracker reference: http://bugs.typo3.org/view.php?id=8205
> 
> Branches: TYPO3_4-2, trunk
> 
> 
> Problem:
> there are 4 problems that are all fixed by this patch
> 
> 1) when creating shortcut from file_list it ends up in parse_url error
> 2) when creating shortcut after Clickmenu it ends up in parse_url error
> 3) If you create shortcut from "edit page properties" label of shortcut 
> can't get page name
> 4) If you access items in Clickmenu returnUrl contains complete url with 
> host
> 
> Solution:
> 1 & 2) parameter $_GET['url'] hasn't processed with urldecode
> 3) use $shortcut['recordid'] for pageId if present
> 4) when JS builds returnUrl it uses document.location. This contains full 
> URL with host information.
> All Urls are processed with top.rawurlencode, which is a JS-substitute for 
> the same php-function.
> 
> I extracted the host in this function.

I don't think it's correct to remove the host name arbitrarily from all 
arguents to the JS version of rawurlencode() in backend.php. If it must 
be removed (for whatever reason) then it must be removed before passing 
it to the function.

Which remindes me that if you want to make the return URL relative to 
the TYPO3 backend it is not enough to remove the protocol/host as there 
might be a path prefix (eg http://my.domain/foo/bar/typo3). AFAIK the 
return URLs created from PHP are always URLs, so why should the JS 
version act differently?

Masi


More information about the TYPO3-team-core mailing list