[TYPO3-core] RFC: #10724: Feature: Provide a check that compare a given URL with the host, TYPO3 is running on!

Dan Osipov dosipov at phillyburbs.com
Tue Sep 1 15:07:45 CEST 2009


+1 by reading - what's the status of this?

Dan Osipov
Calkins Media
http://danosipov.com/blog/

Marcus Krause wrote:
> Hi,
> 
> This is SVN patch request.
> 
> Type: Feature
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=10724
> 
> Branches: trunk
> 
> 
> Problem:
> I'd like to allow BE editors to reference resources (URL) but only if
> they are on the same host TYPO3 is running on.
> 
> Unfortunately there's no nice API to make such a check.
> 
> 
> Solution:
> Provide such a nice method.
> 
> 
> Note:
> The attached patch provides following additional functions:
> 
> t3lib_div::isURL($url)
>  checks if a given string is a URL
> 
> t3lib_befunc::isAllowedSite($url)
>  checks if a given URL matches the host TYPO3 is running on
> 
> In addition, Unit Test are added to check above functions work properly.
> 
> 
> Marcus.
> 
> 


More information about the TYPO3-team-core mailing list