Page MenuHomePhabricator

Require user signatures to contain a link to their user page, talk page or contributions
Closed, ResolvedPublic

Description

We should require user signatures to contain at least one link to their user page, talk page or contributions.

Various tools don't work correctly when such a link is missing. For example, Echo notifications are not sent, DiscussionTools will not allow replying to these comments [i], en.wp's SineBot treats these comments as unsigned.

Such requirement has been present for a long time in many wikis' policies, but it's not enforced by software. Hopefully this is not a controversial requirement.


Dependencies

The patches to meet the "Requirements" described below should NOT be merged until the following tickets are resolved:

Requirements

  • When someone attempts to save a signature that meets any of the conditions below, prevent the signature from being saved and present a message that explains to people: 1) that their signature cannot be saved as it is currently written, 2) why their signature cannot be saved as it is currently written and 3) what changes they need to make to the signature they have written in order to save it.
    • Conditions:
      • The signature does NOT contain at least one link to their user page, talk page or contributions.
      • The signature does NOT contain at least one local link to their user page, talk page or contributions.

Note: this change should not affect current signatures that would become invalid as a result of this change, as noted in T140606#5829318

Testing details

Scenario A: no link (local or otherwise)

  1. Visit: https://en.wikipedia.org/wiki/Special:Preferences
  2. Navigate to the Signature section
  3. Check the Treat the above as wiki markup box
  4. Enter a signature that does NOT contain at least one link to your user page, talk page or contributions (e.g. RYasmeen (WMF))
  5. Click Save
  6. ❗️Notice the follow message appears beneath the Signature: text field: Your signature must include a link to your user page, talk page or contributions on this wiki. Please add it, for example: [[YOUR USERNAME|YOUR USERNAME]] ([[User talk:YOUR USERNAME|talk]])

Scenario B: one link that is NOT a local link

  1. Visit: https://en.wikipedia.org/wiki/Special:Preferences
  2. Navigate to the Signature section
  3. Check the Treat the above as wiki markup box
  4. Enter a signature that does NOT contain at least one local link to your user, talk or contributions page (e.g. [[meta:User:RYasmeen (WMF)|RYasmeen (WMF)]])
  5. Click Save
  6. ❗️Notice the follow message appears beneath the Signature: text field: Your signature must include a link to your user page, talk page or contributions on this wiki. Please add it, for example: [[YOUR USERNAME|YOUR USERNAME]] ([[User talk:YOUR USERNAME|talk]])

Scenario C: two links: one local, one NOT local

  1. Visit: https://en.wikipedia.org/wiki/Special:Preferences
  2. Navigate to the Signature section
  3. Check the Treat the above as wiki markup box
  4. Enter a signature contains two links: a link to your LOCAL user, talk or contributions page (e.g. [[User:RYasmeen (WMF)|RYasmeen (WMF)]]) AND a link to your user, talk or contributions page at a DIFFERENT wiki (e.g. [[meta:User:RYasmeen (WMF)|RYasmeen (WMF)]]).
  5. Click Save
  6. ✅ This case should pass.

Done

  • Patches are written that meet the "Requirements" described above

Example wiki policies that require this:

(Although I also found a few wikis that don't require it:)


i. https://w.wiki/Rt9

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
JTannerWMF subscribed.

Once we get community input as mentioned in T244519 we can work on this task.

Please consider a link to a user page with the same nick but a different wiki.

  • Imagine a steward or a small wiki support hand. They might link to a user or user talk page at meta: or at their home wiki.
  • If they are obliged to sign with every small wiki individually, they might get problems to track their business distributed over 100 small wiki user talk pages.

A main user page or main user talk page should be linked at least, not only subpages. That goes for version history and transparency; it would be easy to channel all complaints into a subpage, then request deletion of the subpage and keep a clean main user talk page version history. German Wikipedia has specific rules on deleting main user talk page (never deleting, might be moved, but moving can be tracked).

Another issue: The signature must not contain any link to the user (talk, sub) page of any other SUL. Linking project pages and advertising is okay, but a contribution should be assigned unanimously to the unique account mentioned in user space links.

I'm not sure which of the constellation of tasks it's best to make a comment about this, but user signatures should also ban templatestyles invocations. (I just let a user know not to have that in their signature, so yes, at least one case exists.)

@Izno Would it make more sense to have a blanket ban on all extension tags, rather than just TemplateStyles? I can't see <poem></poem> being useful in this context, for instance. Prohibiting magic words might also be appropriate. That said, the requirements seem to be primarily directed at making parsing easier, whereas the use of TemplateStyles probably wouldn't affect parsing in a meaningful way.

I think the relevant discussion page is on mediawiki.org. The page says comments were expected by the end of March, but Whatamidoing has clarified that it's fine to keep commenting until coding work actually starts.

If they are obliged to sign with every small wiki individually, they might get problems to track their business distributed over 100 small wiki user talk pages.

You can just turn your local talk page into a soft redirect to the desired one. We also have global notifications now.

Updating the task description to include a link to a diff [i] demonstrating the following issue:

Various tools don't work correctly when such a link is missing. For example...DiscussionTools will not allow replying to these comments


i. https://w.wiki/Rt9

(Although I also found a few wikis that don't require it:)

I'm only speaking for frwiki, but some recent discussions have pointed out the colours of the pseudonyms, their structures, sometimes missing links, etc. So this could change, but nothing concrete for the moment. There are common expectations for signatures in all communities.

Task description updates
The scope of this task is now clear, now that we've finalized the changes and implementation plan. See T248632 for details.

With the above in mind, I've updated the task description with what's described below.

Blocking
This task will get "unblocked" once the following tickets are resolved


Dependencies
The patches to meet the "Requirements" described below should NOT be merged until the following tickets are resolved:

Requirements

  • When someone attempts to save a signature that meets any of the conditions below, prevent the signature from being saved and present a message that explains to people: 1) that their signature cannot be saved as it is currently written, 2) why their signature cannot be saved as it is currently written and 3) what changes they need to make to the signature they have written in order to save it.
    • Conditions:
      • The signature does NOT contain at least one link to their user page, talk page or contributions.
      • The signature does NOT contain at least one local link to their user page, talk page or contributions.

Note: this change should not affect current signatures that would become invalid as a result of this change, as noted in T140606#5829318

If they are obliged to sign with every small wiki individually, they might get problems to track their business distributed over 100 small wiki user talk pages.

You can just turn your local talk page into a soft redirect to the desired one. We also have global notifications now.

This is not satisfying.

  • It puts extra efforts to the user who wants to respond.
    • They have to stop at the local soft redirect page first.
    • Then everybody has to understand what is happening there, and should not respond right now but follow the soft redirect.
    • I am using such soft redirects, but I made the experience here and in other places, that people are opening threads on the redirect page, despite of __NONEWSECTIONLINK__. Which will be unobserved and stay unanswered.
  • I switched off global notifications (I never activated that on my home wiki) since it is very very noisy.
    • There are many threads on global wikis on my radar, but I take notice on demand only, when visiting one of the global wikis.
    • As long I am busy on my home wiki you are obliged to contact my globally centralized local talk page there if you want a quick reply.

I stick to my view that a link to the same account on any SUL wiki is sufficient, like meta, commons, mw, or just home.

  • However, it might be obligatory to prepend user: or user talk: when linking out of local wiki into international business.

@PerfektesChaos Technically this will not be possible to implement as we would have to load the localised version of "User:" from the API for hundreds of languages.

Note that the requirement is only that you have at least one local user page link. You can have as many links in addition to that one link as you want (including cross-wiki links) and you could visually hide or otherwise mute that local link.

This may be a misunderstanding.

It shall be valid to provide a link to

  • any local user space or local user talk page or any local alias of those, as requested already
  • any page by interwiki link to syntactically other project, iff user: or user talk: is used (case insensitive).

Therefore it does not cause additional efforts.

  • While projects may be founded and get closed, even xxx:user:nobody might be regarded as valid.
  • At time of creation of fancy signature it may be resolved via site matrix whether there is currently some project ID xx:yy:user:someone.

A steward or interface editor of small wikis cannot be obliged to create a local talk page in every visited project, nor are users able to deal with instructions of a local project page, even worse in reciprocal unknown language.

  • Global user page may overcome some problems, but this requires less frequent visitors to build up a huge infrastructure and watching capabilities to be available after some service has been done for an outback wiki.
  • Users in peripheral wikis are to be guided to contact immediately at a globally unique point rather than at unobserved local places, also to organize a central workflow.
  • I am doing some software support for wikis without any other business there, and a local thread there is a dead end.

@PerfektesChaos If I understand correctly, you'd like signatures like this to be allowed: [[w:de:User:Blah|Blah]] [[w:de:User talk:Blah|talk]] (requiring the namespace names to be in English).

This would probably be possible to implement, but it's not just a matter or removing the interwiki prefix when validating the signature – I think we would need to make changes to signature parsing code in both DiscussionTools and in Echo for them to recognize that markup as a signature. I don't really want to do that, I wanted the added validation rules to allow existing tools to recognize the signatures, without updating them.

However, it's not clear to me why the following would not be sufficient: [[User:Blah|Blah]] [[w:de:Benutzer Diskussion:Blah|talk]] (and it is allowed under the proposed validation rules).

  • The first link to your local user page fulfills the requirement
  • You don't actually need to create a user page on every project, just a global user page on Meta
  • The second link to your main user talk page should be enough to direct people to message you there instead of locally

@AntiCompositeNumber's signature-checking tool gives an error at https://signatures.toolforge.org/check/en.wikipedia.org/EEng The custom sig includes a link to a specific section on the user page. Will this be considered valid?

A steward or interface editor of small wikis cannot be obliged to create a local talk page in every visited project

The pages do not have to be created. A redlink is sufficient.

With Echo/Notifications, most people find it easy to keep track of discussions on their own talk pages at any wiki.

@AntiCompositeNumber's signature-checking tool gives an error at https://signatures.toolforge.org/check/en.wikipedia.org/EEng The custom sig includes a link to a specific section on the user page. Will this be considered valid?

I'm going to say that's a false positive, especially since the default signature on enwiki includes a section link. Fixed.

Change 569062 merged by jenkins-bot:
[mediawiki/core@master] preferences: Signature validation (lint errors, user links, nested subst)

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

@matmarex can you:

  1. REVIEW the "Testing details" section of the task description to ensure it is accurate and exhaustive?
  2. UDPATE the "Testing details" section of the task description with answers to the questions I posed?

cc @Ryasmeen

First round of testing is completed on Beta. I have some observations and questions.

  1. Scenario A is passing as expected.
  2. For Scenario B I used the following as my signature, assuming a link to a talk page on Meta would be considered as non-local link for Beta:

[[User:RYasmeen (WMF)|RYasmeen (WMF)]] (talk)

I am not sure if this is the right format for a link in Signature field, But the way it renders on the talk page is as follows:

Screen Shot 2020-07-07 at 3.23.25 PM.png (48×580 px, 18 KB)

I also tried the following format for non-local link, in which case it does not even consider that as a link. Not sure if that's expected either:

[[meta:User:RYasmeen (WMF)|RYasmeen (WMF)]]

  1. I checked an additional scenario where I kept the Signature field empty and checked the option to Treat it as wiki markup. In this scenario, I am getting the following error message.

"Your signature contains nested substitution (e.g. subst: or ~~~~)."

Is that expected?

Screen Shot 2020-07-07 at 2.19.31 PM.png (246×907 px, 71 KB)

  1. I checked an additional scenario where I kept the Signature field empty and checked the option to Treat it as wiki markup. In this scenario, I am getting the following error message.

"Your signature contains nested substitution (e.g. subst: or ~~~~)."

Is that expected?

Screen Shot 2020-07-07 at 2.19.31 PM.png (246×907 px, 71 KB)

Rejecting it is probably expected, but the error message is certainly not. rMW includes/preferences/SignatureValidator.php:59 (at e591232e793b) wants to check whether $this->applyPreSaveTransform returns false, which indicates there’s something nasty going on with substitutions. But this function may return the empty string as well, which is also falsy, and thus triggers this error message. Probably this line should be changed to

		if ( $pstSignature === false ) {

and another check should be introduced for

		if ( $pstSignature === '' ) {

which displays a different error message.

@matmarex can you:

  1. REVIEW the "Testing details" section of the task description to ensure it is accurate and exhaustive?
  2. UDPATE the "Testing details" section of the task description with answers to the questions I posed?

Done, the message is "Your signature must include a link to your user page, talk page or contributions", in both situations.

Are you saying it should be different? (Maybe it should be "…your local user page…"?)

  1. For Scenario B I used the following as my signature, assuming a link to a talk page on Meta would be considered as non-local link for Beta:

[[User:RYasmeen (WMF)|RYasmeen (WMF)]] ([[https://meta.wikimedia.org/wiki/User_talk:RYasmeen_(WMF))|talk]])

I am not sure if this is the right format for a link in Signature field, But the way it renders on the talk page is as follows:

Screen Shot 2020-07-07 at 3.23.25 PM.png (48×580 px, 18 KB)

The syntax for an external link should be:

[[User:RYasmeen (WMF)|RYasmeen (WMF)]] ([https://meta.wikimedia.org/wiki/User_talk:RYasmeen_(WMF) talk])

I also tried the following format for non-local link, in which case it does not even consider that as a link. Not sure if that's expected either:

[[meta:User:RYasmeen (WMF)|RYasmeen (WMF]]

Can you clarify what you mean? This looks like the right syntax for an interwiki link to me.


Also, this isn't clear from Peter's scenario, these two signatures should behave differently:

  • [[meta:User:RYasmeen (WMF)|RYasmeen (WMF)]] ([[User talk:RYasmeen (WMF)|talk]]) – this is valid, because in addition to the interwiki link, there is also a local link
  • [[meta:User:RYasmeen (WMF)|RYasmeen (WMF)]] – this is not valid, because there is no local link

I'm not sure which one you actually tried. Maybe we should have two scenarios.

  1. I checked an additional scenario where I kept the Signature field empty and checked the option to Treat it as wiki markup. In this scenario, I am getting the following error message.

"Your signature contains nested substitution (e.g. subst: or ~~~~)."

Is that expected?

Screen Shot 2020-07-07 at 2.19.31 PM.png (246×907 px, 71 KB)

Rejecting it is probably expected, but the error message is certainly not. rMW includes/preferences/SignatureValidator.php:59 (at e591232e793b) wants to check whether $this->applyPreSaveTransform returns false, which indicates there’s something nasty going on with substitutions. But this function may return the empty string as well, which is also falsy, and thus triggers this error message. Probably this line should be changed to

		if ( $pstSignature === false ) {

and another check should be introduced for

		if ( $pstSignature === '' ) {

which displays a different error message.

Indeed, that's exactly right. Thanks! I'll submit a patch.

With this bug fixed, empty signature will display the error that "Your signature must include a link to your user page, talk page or contributions", which is sensible enough, so I don't think we need a separate message for this case.

Change 610408 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] SignatureValidator: Don't confuse empty signature with nested PST

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

Also, this isn't clear from Peter's scenario, these two signatures should behave differently:

  • [[meta:User:RYasmeen (WMF)|RYasmeen (WMF)]] ([[User talk:RYasmeen (WMF)|talk]]) – this is valid, because in addition to the interwiki link, there is also a local link
  • [[meta:User:RYasmeen (WMF)|RYasmeen (WMF)]] – this is not valid, because there is no local link

I'm not sure which one you actually tried. Maybe we should have two scenarios.

@matmarex can you give the task description a read? I've updated it to include the two scenarios you mentioned above. They are titled as follows:

  • Scenario B: one link that is NOT a local link
  • Scenario C: two links: one local, one NOT local

@matmarex can you:

  1. REVIEW the "Testing details" section of the task description to ensure it is accurate and exhaustive?
  2. UDPATE the "Testing details" section of the task description with answers to the questions I posed?

Done, the message is "Your signature must include a link to your user page, talk page or contributions", in both situations.

Are you saying it should be different? (Maybe it should be "…your local user page…"?)

Yep, exactly. This language is reflected in "Step 6." of **Scenario B..." in the task description.

I checked the three scenarios listed in the task description (the updated ones). All of them are passing. I am now just waiting for @matmarex's patch about handling empty signatures to be merged (assuming it's not, since it's still failing).

Change 610408 merged by jenkins-bot:
[mediawiki/core@master] SignatureValidator: Don't confuse empty signature with nested PST

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

(the fix should be on the Beta cluster now)

Are you saying it should be different? (Maybe it should be "…your local user page…"?)

Yep, exactly. This language is reflected in "Step 6." of **Scenario B..." in the task description.

On second thought, I think we should make it say "your user page on this wiki" rather than "your local user page". I think it's clearer and easier to translate correctly. I don't think we should have two versions of the message, just use this one in both scenarios.

So I'm proposing this:

Your signature must include a link to your user page, talk page or contributions on this wiki. Please add it, for example: [[YOUR USERNAME|YOUR USERNAME]] ([[User talk:YOUR USERNAME|talk]])

Change 612425 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] Clarify error about links in signature validation

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

Are you saying it should be different? (Maybe it should be "…your local user page…"?)

Yep, exactly. This language is reflected in "Step 6." of **Scenario B..." in the task description.

On second thought, I think we should make it say "your user page on this wiki" rather than "your local user page". I think it's clearer and easier to translate correctly. I don't think we should have two versions of the message, just use this one in both scenarios.

Good eye, Bartosz and I agree.

So I'm proposing this:

Your signature must include a link to your user page, talk page or contributions on this wiki. Please add it, for example: [[YOUR USERNAME|YOUR USERNAME]] ([[User talk:YOUR USERNAME|talk]])

This looks good. I've added this language to Scenario A and Scenario B in the task description.

(the fix should be on the Beta cluster now)

Checked it on Beta today, seems fixed.

However, the language change from "your local user page" to "your user page on this wiki" is still not reflected there, is the patch merged for that?

Change 612425 merged by jenkins-bot:
[mediawiki/core@master] Clarify error about links in signature validation

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

It wasn't, it is now, and should be reflected on Beta soon.

Alright, looks good now. With that, this ticket can now be closed. :)