Last modified: 2014-02-26 12:55:07 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 T45600, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43600 - query string's ending semicolon can appear to be the last field's value
query string's ending semicolon can appear to be the last field's value
Status: RESOLVED FIXED
Product: Analytics
Classification: Unclassified
EventLogging (Other open bugs)
unspecified
All All
: Unprioritized minor
: ---
Assigned To: Ori Livneh
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-03 00:19 UTC by spage
Modified: 2014-02-26 12:55 UTC (History)
8 users (show)

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


Attachments

Description spage 2013-01-03 00:19:58 UTC
If the last key's value in the query string is empty, then the trailing semicolon appears to be its value.  For example,

  mw.eventLog.schemas.GettingStarted.defaults = {};
  mw.eventLog.logEvent( 'GettingStarted', {anon: false, action: "x", token: ""} );

validates OK but logs as /event.gif?_db=my_wiki&_id=GettingStarted&_rv=4910146&_ok=true&anon=false&action=x&token=;

and DevServer.php interprets this final parameter as { token: ";" }.  The server log2json.py code strips the semicolon (using parse_qsl(q.strip('?;')) ) so that endpoint doesn't experience this bug.

One fix might be to always pad the query string with &;, in logEvent()
    beacon.src = baseUri + '?' + queryString + '&;';


This bug will go away when and if we encode a JSON structure in the query string, as its key values are delimited by JSON punctuation.
Comment 1 Ori Livneh 2013-01-10 11:20:14 UTC
Gerrit change #42220.
Comment 2 Andre Klapper 2014-02-26 12:55:07 UTC
[moving from MediaWiki extensions to Analytics product - see bug 61946]

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


Navigation
Links