Zoranzoki21 added a comment.
In T232672#5487675 <https://phabricator.wikimedia.org/T232672#5487675>, @Anomie wrote: >> kizule@kizule:~/development/pywikibot-core$ python3 pwb.py patrol -usercontribs:'213.149.159.237' -ask > > The value you're passing there is not just an IP address. It's an IP address prefixed with U+200E (LEFT-TO-RIGHT MARK), which makes it an invalid value. > The Unicode bidi override characters (U+200E, U+200F, and U+202A–U+202E) are stripped from actual usernames during canonicalization (as part of passing it through the page title parser), but the API parameter validation does not strip them from IP addresses when validating those. At a glance it looks like other code in MediaWiki that handles IP usernames specially also generally doesn't strip these characters. > The API validation code for IP usernames also doesn't trim leading or trailing whitespace, as is done for page titles. > I'm undecided whether this code should be updated to do that stripping, or if the non-stripping is acceptable behavior. I tried with 'IP address' and without it but same happening. TASK DETAIL https://phabricator.wikimedia.org/T232672 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Zoranzoki21 Cc: Anomie, Aklapper, Zoranzoki21, pywikibot-bugs-list, WDoranWMF, holger.knust, EvanProdromou, Viztor, DannyS712, Wenyi, Amorymeltzer, Tbscho, MayS, Sethakill, Mdupont, JJMC89, dg711, Dvorapa, Agabi10, Altostratus, Avicennasis, Pchelolo, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy, Legoktm
_______________________________________________ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs