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

Marcus Krause marcus#exp2009 at t3sec.info
Wed Mar 18 18:26:48 CET 2009


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10724.diff
Type: text/x-diff
Size: 5298 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090318/e68ba437/attachment.diff 


More information about the TYPO3-team-core mailing list