[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
Tue Sep 1 18:48:34 CEST 2009


FYI: Committed to SVN Trunk (rev. 5867 & 5868)

olly


Oliver Hader schrieb:
> Hi Marcus,
> 
> Marcus Krause schrieb:
>> Marcus Krause schrieb am 04/06/2009 12:13 PM Uhr:
>>> Ingo Renner schrieb am 04/04/2009 11:07 AM Uhr:
>>>> Martin Kutschker wrote:
>>>>> Oliver Hader schrieb:
>>>>>> 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.
>>>>> -1 if the name stays t3lib_div::isAllowedUrl. The name implies a check
>>>>> against a list of valid urls. In fact it only checks if the given
>>>>> scheme/host/port (but not the user part) of the current HTTP request is
>>>>> the same.
>>>> that's what came to my mind, too.
>>>>
>>>>> Maybe t3lib_div::cmpHost($url, $hostlist) is more in line with the
>>>>> current code (see t3lib_div::cmpIP).
>>>> however, I wouldn't like to go with the mistakes from the past and would
>>>> therefore suggest calling the function
>>>>
>>>> isSameHost($url) or isSameAsExecutingHost($url) or equalsThisHost() or ...
>>> Okay, I will send another patch using isSameHost(). That's the
>>> "direction" it was initially intended.
>> v4 - another try with isSameHost($url)
> 
> +1 on reading and testing
> 
> I changed it to isOnCurrentHost($url) and modified the accordant parts.
> I'm going to take care of the commits later.
> 
> olly
-- 
Oliver Hader
TYPO3 Release Manager 4.3


More information about the TYPO3-team-core mailing list