Summary
When Temporary accounts are enabled on a wiki it causes the creation of an account. However, on WMF wikis we have some wikis where the creation of an account is not allowed for anon users. We want to disable anon editing on these wikis to avoid exposing the IP address used by a temporary account.
Background
- Temporary accounts can be enabled on a wiki, which causes a temporary account to be created when a user makes their first edit while logged out
- The RealTempUserConfig::shouldAutoCreate method is called to determine if a temporary account should be created for an edit
- This method checks that the user has the authority needed to create an account (via the createaccount right)
- This fails on wikis where $wmgDisableAccountCreation is true, because that causes createaccount to be revoked from all users
- When a user tries to edit a wiki without the createaccount right being given to all users and also which has temporary accounts enabled then:
- The EditPage class determines that temporary account autocreation is not supported for the edit action
- The revision attempts to be saved, but a CannotCreateActorException is thrown because the performer is marked as an IP
- This also means that if the user hits an AbuseFilter targeting their edit, they will have AbuseFilter logs associated with their IP publicly visible as if temporary accounts were not enabled
- Therefore, temporary account autocreation is incompatible with $wmgDisableAccountCreation in the current form
- To solve this we can do one or some of the following:
- Make temporary account autocreation skip the createaccount check
- Disable anon editing on all wikis with $wmgDisableAccountCreation set
- Don't throw the CannotCreateActorException if the createaccount right is missing from the * group
- To solve this we can do one or some of the following:
- The wikis which have $wmgDisableAccountCreation set are foundationwiki, wikimaniawiki, and wikidatatestwiki
- foundationwiki has anon editing disabled, wikimaniawiki has anon editing disabled via an edit filter, and wikidatatestwiki is as test wiki which disabled account creation due to spam
Technical notes
- Temporary account autocreation for their first action (such as editing) should check if the user can autocreateaccount instead of createaccount
Acceptance criteria
- Temporary accounts feature works when $wmgDisableAccountCreation is set but anon editing is still allowed