[Owncloud] fixed redirect to desired page after login
Thomas Tanghus
thomas at tanghus.net
Sat May 19 00:04:18 UTC 2012
On Saturday 19 May 2012 00:50 Georg Ehrke wrote:
> Am 19.05.2012 um 00:37 schrieb Michael Gapczynski:
> > I thought about that, but wouldn't that mean you'd also have to check for
> > .com, .net, .org, etc. ?
>
> Just:
> if(preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $_GET['redirect)){ //deny }
Great. Now I know how to ask about regexps ;-)
(and who to tell about trimming excess quotes...)
--
Med venlig hilsen / Best Regards
Thomas Tanghus
More information about the Owncloud
mailing list