(bug 27854) Http::isValidURI is way to lax. This is a much simplified regex that...
authorBrian Wolff <bawolff@users.mediawiki.org>
Sun, 6 Mar 2011 02:43:24 +0000 (02:43 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Sun, 6 Mar 2011 02:43:24 +0000 (02:43 +0000)
commit65eaa9dae1ebf60beda857a9fa5688035c137f65
tree51d1e9a90d7b3621c87e297e230217f309799a50
parenta8a47d6a12ee9fe96030c901d8043cc7f8f30330
(bug 27854) Http::isValidURI is way to lax. This is a much simplified regex that accepts a subset of the previous
regex, but also accepts ftps because both cURL and php support it. It no longer accepts thing like 'foo http://bar bax'
which was my main concern

Note the previous regex kind of looks more restrictive, but is not since saying "anything not containing a space
optionally followed by anything not containing a bunch of characters including a space" is the same as saying anything
with no spaces. See also r83296. This obviously doesn't catch all cases, but I personally think its sufficient.
At the very least it is a very significant improvement over the previous version that caught almost nothing.
RELEASE-NOTES
includes/HttpFunctions.php