Page MenuHomePhabricator

FRUEC: For legacy compatibility, empty language property should default to 'en' for LandingPage impressions
Open, Needs TriagePublic1 Story Points

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 11 2019, 3:54 PM

FRUEC currently accepts LandingPage events with no language property in the JSON input. However, if the property exists and its value is an empty string, the event is marked invalid and not counted. However, in such a case, the legacy system (DjangoBannerStats) defaults the language to 'en'.

Here's the old code that does that: https://gerrit.wikimedia.org/r/plugins/gitiles/wikimedia/fundraising/tools/DjangoBannerStats/+/3e351eb6e36875962c91b35b277fa8c288bcc490/fundraiser/analytics/functions.py#85

I also double-checked in the pgeheres database: there are events with an empty uselang parameter that are stored in the DB with en as the language.

So far, looking at log entries like this, it seems they could well be hacking attempts. Still, for full compatibility we might still wish to reproduce this default behaviour in FRUEC.

AndyRussG renamed this task from FRUEC: Empty language property should default to 'en' for LandingPage impressions to FRUEC: For legacy compatibility, empty language property should default to 'en' for LandingPage impressions.Nov 11 2019, 8:53 PM