Page MenuHomePhabricator

Outreachy microtask: collect captcha data from signup page (#1)
Closed, ResolvedPublic


This is a microtask for Outreachy applicants for T158909: Automatically detect spambot registration using machine learning (like invisible reCAPTCHA) .

  • Set up local development environment. (You'll probably want to use MediaWiki-Vagrant.)
  • Create a simple Javasrcipt file that records something on the signup page. (The data does not have to be useful at this stage; e.g. you could record the mouse position when the submit button is clicked.) You can use mw.track to do the recording.
  • Add the file to the signup page (see documentation). You might add it to [[MediaWiki]] itself, or to some related extenstion like Extension:ConfirmEdit or Extension:WikimediaEvents, whichever you find easier.
  • Submit the code you wrote to Gerrit. Make sure to start the commit message with [DO NOT MERGE] and explain in the commit description that this is an Outreachy microtask and not intended to be merged. (Eventually the code should go into a new extension, but setting that up is too much work for a microtask.) Add mentors as reviewers.

The documentation is not great; please don't hesitate to ask questions if something is not clear (or you just don't want to read through a huge wall of text). #wikimedia-devrel or {Z610} is a good starting point.

Event Timeline

Tgr created this task.Sep 8 2017, 4:14 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 8 2017, 4:14 AM
Tgr renamed this task from Outreachy microtask: collect user data from signup page (#1) to Outreachy microtask: collect captcha data from signup page (#1).Sep 8 2017, 4:16 AM
Kamsuri5 claimed this task.Sep 8 2017, 6:41 AM

Is it fine for me to work on this task?

Suhadakashter closed this task as a duplicate of T175367: Page wikipedia.
Reedy reopened this task as Open.Sep 8 2017, 2:10 PM

Change 377031 had a related patch set uploaded (by VeenaSankar; owner: VeenaSankar):
[mediawiki/core@master] [DO NOT MERGE] Created mouseClick.js

  • Set up local environment using MediaWiki-Vagrant.
  • Created mouseClick.js to record mouse position on Registration page (/w/index.php?title=Special:CreateAccount&returnto=Main+Page) since I was not sure what html file to integrate this javascript file into OR what resources.php file to integrate this javascript file into. I need some help to figure this out please. Then I should hopefully be able to record mouse clicks only when someone clicks on "Create your account".
  • Above change is present as a patch here -

Thanks in advance. Excited to work on this!

Hello @Tgr!
I have made a few changes. Please check it here.
I have added a module in WikimediaEvents which basically tracks a button click using GuidedTourButtonClick schema. I am not sure if i am on right track, so after reviewing the code can you tell me whether i am on right path or not? And i was not sure of a few parameters of the schema, so i have marked them as "Unkown" as of now.

Hi all - just checking back to see if anybody had a chance to review my patch in the last few days. I want to make some progress but not sure exactly how to proceed. Please help. Thank you in advance :)

Tgr added a comment.Sep 17 2017, 9:12 AM

Hi all, sorry for the late reaction.

Is it fine for me to work on this task?

Yes. To anyone who wants to work on this, feel free to, there is no need for asking.
(Ideally, everyone would get a different microtask as working on something that already has a published solution is an awkwards situation - but clearly there is way more interest in this project then my ability to come up with microtasks, so it can't be avoided.)

@Veenasankar MediaWiki has its own asset management system that loads Javascript files (after minification, concatenation etc) so you generally don't add them to the HTML just tell the loading system via configuration that you need the file. Resources.php (which is one way to do that) is in the resources directory.

@Kamsuri5 I left comments on the patch.

Hi @Tgr , I have created a commit here . Kindly check it out :)

Tgr updated the task description. (Show Details)Oct 2 2017, 4:55 AM
Kamsuri5 added a comment.EditedOct 2 2017, 12:41 PM

Hi @Tgr !
Thank you for your comments.
Actually i am facing an issue with the local environment, "vagrant up" command is failing continuously.
It would be really helpful if you can suggest something to correct it. While cloning the repository mediawiki folder isn't getting cloned. I have also tried the troubleshooting steps mentioned here but it is not getting corrected. I have also cloned the mediawiki folder externally and then tried but it is not resolving.
I am trying to sort it out and will update the code as soon as it gets resolved.

Tgr added a comment.Oct 2 2017, 11:28 PM

@Kamsuri5 please see the workarounds in T152801. You probably have start the setup from scratch (from step 5 here) and clone the folder before running vagrant up.

If that doesn't work please ask somone in IRC (on #wikimedia-dev or #wikimedia-cloud; I'm tgr or tgr|away when online). Vagrant issues take a lot of time to debug without real-time communication.

Tgr removed Dristibutola as the assignee of this task.Oct 3 2017, 9:19 AM
Tgr added a subscriber: Dristibutola.

Thanks @Tgr for the suggestions.
I will try it this way.

Will contact you on IRC if this doesn't work.

Sofmonk added a subscriber: awight.Oct 6 2017, 5:02 AM

@Tgr @awight Please see gerrit_task1 and provide me further guidance.

Change 377031 abandoned by Gergő Tisza:
[DO NOT MERGE] Created mouseClick.js

Abandoning all Outreachy microtask related changesets; the application period is over. Thanks for participating! For contributing outside Outreachy, see and .

Tgr closed this task as Resolved.Dec 3 2017, 6:25 AM
Tgr claimed this task.