[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
Thu Mar 19 08:44:43 CET 2009


Oliver Hader schrieb am 03/18/2009 09:40 PM Uhr:
> 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'll try to remember it the next time; but no promises. ;-)


> 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

Thanks.


Marcus.


More information about the TYPO3-team-core mailing list