PDA

View Full Version : [Fixed] v2.3.0-prior: URLs containing "<char>://" will be incorrectly parsed


Paul
Wed 28th May '03, 2:54pm
Hi all,

There's a small bug in the regex that checks for the presence of a protocol defined in a url.

in admin/functions.php:


if(!preg_match("![a-z]://!si", $url)) {


will match any instance of "<alphacharacter>://" anywhere in a URL. This means that urls entered into a post such as:

www.some.site/view?http://www.another.site (note the lack of a http:// prefix)

.. will NOT be prefixed with "http://" and will pass the regex.

It should be:


if(!preg_match("!^[a-z]+://!si", $url)) {


Best wishes,
Paul

Steve Machol
Wed 28th May '03, 2:55pm
Moved to Bugs for a Dev to check.

Scott MacVicar
Sun 8th Jun '03, 6:15pm
fixed.

aidler
Thu 12th Jun '03, 10:18pm
fixed.

Ähhhh and where can I find the fix??

Steve Machol
Fri 13th Jun '03, 1:37am
In 2.3.1 when it's released.

aidler
Fri 13th Jun '03, 10:14am
Ah - ok. Thought 2.3 would be the last 2.x release.

So you are no longer publishing individual fixes and instead collect all bugs to fix them in a new release. hmmmmm I see. Thanks.

Paul
Sat 14th Jun '03, 2:20am
The fix is in my post above. Individual fixes were never published by Jelsoft as user-modified files are unsupported. If this is something you need to correct immediately, applying the fix above will work.

Use caution when modifying the code and ensure you backup everything before hand.

Best wishes,
Paul