Page MenuHomePhabricator

Create profile threshold using MediaWiki user rights
Closed, ResolvedPublic

Description

On WebPlatform Docs we are using Social Profile and we are being link spammed. We are not using all the features and stats of SocialProfile, not even the stats.

When I tried to block spammers to create a profile (e.g. $wgUserProfileThresholds['edit'] = $wgAutoConfirmCount), I realized that I had to setup a SocialProfile feature we don’t want to use for now.

How about it had a simplified treshold mechanism based on MediaWiki internal.

In our case, the right to create a page in the wiki is considered an equivalent right as one of creating a user profile.

To do this, I made this patch:

diff --git a/UserProfile/SpecialUpdateProfile.php b/UserProfile/SpecialUpdateProfile.php
index 3ef038c..378cdde 100644
--- a/UserProfile/SpecialUpdateProfile.php
+++ b/UserProfile/SpecialUpdateProfile.php
@@ -106,6 +106,8 @@ class SpecialUpdateProfile extends UnlistedSpecialPage {
                                }
                        }

+$can_create = ($user->isAllowed('createpage'))?true:$can_create; // Suggestion
+

Thanks for considering the feature.

Event Timeline

Renoirb raised the priority of this task from to Needs Triage.
Renoirb updated the task description. (Show Details)
Renoirb added a project: SocialProfile.
Renoirb subscribed.
Renoirb set Security to None.

Renoirb: Thanks for taking a look at the code!

You are welcome to use developer access to submit this as a Git branch directly into Gerrit.
Putting your branch in Git makes it easier to review it quickly. If you don't want to set up Git/Gerrit, you can also use the Gerrit Patch Uploader.

(General MediaWiki info on handling spam.)

Aklapper renamed this task from [question] create profile treshold. Was it intentional to not use MediaWiki user rights? to Create profile threshold using MediaWiki user rights.Jan 7 2015, 8:56 PM

I do have a WMF Gerrit account and all.

I’ll make a change proposal there.

Done.

Its not the exact code as the one I deployed on webplatform.org. But it should fit the code formatting policies.

https://gerrit.wikimedia.org/r/#/c/183387/

gerritbot subscribed.

Change 183387 had a related patch set uploaded (by Lewis Cawte):
As an autoconfirmed user, I should be allowed to edit my profile

https://gerrit.wikimedia.org/r/183387

Patch-For-Review

Change 183387 merged by jenkins-bot:
As an autoconfirmed user, I should be allowed to edit my profile

https://gerrit.wikimedia.org/r/183387

lcawte claimed this task.
lcawte subscribed.

As this patch has been merged, this task should be resolved. Marking as such.