Page MenuHomePhabricator

Allow extensions to handle URL variables
Closed, InvalidPublic

Description

Allow MW extensions to parse incoming URL variables. Possible uses include:

  • Conveying state from the referring page
    • Autosubmission of content (such as the referring page, the title of the

referring page, the username of the user on the referring (non-public) page,
etc) to the target page

    • Modification of the displayed page based on URL variables
  • Creating wikilinks which redirect dynamically to pages, based on the output of

a function of URL variables

Of course the list of variables that would be accepted through any variable
handle, and the functions that would be allowed to process those variables,
should be greatly restricted.


Version: unspecified
Severity: enhancement

Details

Reference
bz376

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:55 PM
bzimport set Reference to bz376.
bzimport added a subscriber: Unknown Object (MLST).

Extensions can pretty much do that everything, or am I missing something?

Extensions can indeed use $wgRequest to grab all the
variables they want.

(Note that this should never, ever be done in a parser hook
extension -- parser extensions must not rely on anything
outside their given content and parameters or they will
break with caching and with future parser changes. Action
hook handlers, special pages, etc can and do legitimately
take parameters from the URL or POST variables.)