Last modified: 2013-10-05 21:12:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T34168, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32168 - wfExpandUrl should expand ".." path segments
wfExpandUrl should expand ".." path segments
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-03 02:57 UTC by Rusty Burchfield
Modified: 2013-10-05 21:12 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rusty Burchfield 2011-11-03 02:57:31 UTC
This section of the RFC explains how it is done.
http://tools.ietf.org/html/rfc3986#section-5.2.4

For example, "/a/b/c/./../../g" becomes "/a/g".

This is important for security reasons where you need to limit URLs to a certain prefix.
Comment 1 Chad H. 2011-11-03 03:16:48 UTC
There's already a @fixme on the function asking for just that :)
Comment 2 Mark A. Hershberger 2011-11-09 14:47:35 UTC
(In reply to comment #0)
> This section of the RFC explains how it is done.
> http://tools.ietf.org/html/rfc3986#section-5.2.4
> 
> For example, "/a/b/c/./../../g" becomes "/a/g".

We do accept patches!
Comment 3 Chad H. 2011-11-09 14:49:43 UTC
(In reply to comment #1)
> There's already a @fixme on the function asking for just that :)

Ignore me. Per IRC discussion at the time, I was misreading the @todo and how it relates to this bug (actually, they don't relate at all)
Comment 4 Rusty Burchfield 2011-11-09 17:00:31 UTC
(In reply to comment #2)
> We do accept patches!

I do intend to implement this.  I just wanted to file a bug so people could comment on it.  ;-)
Comment 5 Rusty Burchfield 2011-11-09 23:14:24 UTC
First step (wfRemoveDotSegments) is in r102587.
Comment 6 Rusty Burchfield 2011-11-15 18:53:48 UTC
r103199 and r103208 finish this off.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links