Page MenuHomePhabricator

RTL usernames can be incorrectly placed in the current investigation header [S]
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

Mixing RTL (right-to-left) usernames and IPv6 addresses can lead to it displaying oddly, for example:

rtl_username_investigation.png (33×453 px, 2 KB)

So far, it seems to display fine if the interface language is RTL. But a check user could still be investigating an RTL username on an LTR wiki/interface.

Steps to reproduce problem
  1. On Special:Investigate, start an investigation for: <rtl username> <ipv6 address> <any username/ip> (in that order, the IPv6 address should contain at least one letter), e.g.
  2. Submit

Expected behavior: The header says: Current investigation for <rtl username>, <ipv6 address> and <any username/ip>
Observed behavior: Header says something like: Current investigation for اسم المستخدم٦, 2406:18c0:88bb:3f3e:7e21:b8b5:58d9:9b9f and Eve

Event Timeline

Hi @Tchanders @phuedx can we have more information on the RTL concept?
Thank you!

For starters, put each username or IP address into a <bdi> HTML tag. This will likely solve most problems.

For general info about RTL issues in MediaWiki, see https://www.mediawiki.org/wiki/Directionality_support

For starters, put each username or IP address into a <bdi> HTML tag. This will likely solve most problems.

For general info about RTL issues in MediaWiki, see https://www.mediawiki.org/wiki/Directionality_support

Thanks @Amire80

@AGueyte Thanks for asking - here's a more general overview to go with the link above: https://www.mediawiki.org/wiki/Writing_systems#Directionality

And a bit of HTML documentation relevant to this concept:

STran renamed this task from RTL usernames can be incorrectly placed in the current investigation header to RTL usernames can be incorrectly placed in the current investigation header [S].Jan 14 2022, 11:05 PM
STran moved this task from Triage/To be Estimated to The Letter Song on the Anti-Harassment board.

Change 755354 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/CheckUser@master] Add bdi tag to usernames in investigation header

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

Change 755354 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Add bdi tag to usernames in investigation header

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

I cannot reproduce the bug in the description.

Here is what the investigation header looks like when I follow the reproduction steps:

rtl_usernames_bug.png (66×772 px, 10 KB)

I randomly generated combinations of RTL and LTR usernames and IPv4 and IPv6 IPs and ranges. I submitted these as targets for investigation. I saw no display issues in the current investigation header.

The testing was done in English interface language. For some of the random investigations I looked at them also in Hebrew or Arabic.

Test Environment: local docker CheckUser 2.5 (02396f4) 16:16, 20 January 2022.