[TYPO3-english] Check URL validity

Gregory Loichot gloichot at cross-systems.com
Mon Nov 22 17:24:05 CET 2010


I have a TYPO3 4.4.4 website and I have a GET parameter (called source) 
in which a user can store an url (a realurl url that point to my 
website, in theory). This url will be used to redirect user in some 
specific conditions.

My question is : is it possible (via a TYPO3 function) to check that the 
url contained in "source" parameter belongs to the TYPO3 site (and not 
to an other external url) ?

Example :
www.mydomain.com/my/page/?source=http://www.mydomain.com/my/folder/ is 
but www.mydomain.com/my/page/?source=http://www.otherdomain.com/test/ 
should me rejected.

More information about the TYPO3-english mailing list