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

Oliver Hader oliver at typo3.org
Wed Mar 18 21:40:27 CET 2009


Hi Marcus,

Marcus Krause schrieb:
> Marcus Krause schrieb am 03/18/2009 06:26 PM Uhr:
>> 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.
> 
> Attached v1 uses string comparison for url matching instead of parsing
> and rebuilding an url.
> Besides that, URL validation is done with filter_var().
> 
> Thanks to Olli for his input. ;-)

The "y" at the end is important here! ;)

I attached a modified version of your patch that moves the
isAllowed-method to t3lib_div since it can be useful for situations that
are not only in the backend. Furthermore I changed the comments and some
formatting issues.

That were only some minimal corrections. Thus:
+1 on reading and testing


ollY
-- 
Oliver Hader
TYPO3 Release Manager 4.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10724_v2.diff
Type: text/x-patch
Size: 3128 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090318/6ea27a86/attachment.bin 


More information about the TYPO3-team-core mailing list