Anomie added a comment.
In general, Wikimedia should probably figure out some way to reconfigure things so it doesn't wind up trying to set both cookies with domain=.wikisource.org and domainless cookies for wikisource.org. It's probably best to use T145545 <https://phabricator.wikimedia.org/T145545> to pursue that. However, it looks like the cookie handling library used by pywikibot is also doing something wrong (at least according to the RFCs), as it should not send the host-only cookie for wikisource.org to zh.wikisource.org. If it's using RFC 2109, "zh.wikisource.org" does not domain-match the cookie for "wikisource.org" because "wikisource.org" doesn't begin with a dot. If it's using RFC 6265, the domainless cookie for "wikisource.org" should have had the host-only-flag set meaning it should not be sent to "zh.wikisource.org". OTOH, it's possible it's being bug-compatible with browsers (RFC 6265 even notes that such a bug exists/existed in some agents in ยง 4.1.2.3 <https://tools.ietf.org/html/rfc6265#section-4.1.2.3>). As far as pywikibot's tests, you might work around all this by avoiding logging in to both wikisource.org and a subdomain during the same test run, or explicitly logging out of wikisource.org after completing the tests against that site, or otherwise flushing cookies. TASK DETAIL https://phabricator.wikimedia.org/T224712 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Dvorapa, Anomie Cc: Reedy, Urbanecm, Jdforrester-WMF, Pchelolo, Anomie, Dvorapa, Framawiki, Aklapper, pywikibot-bugs-list, Dalba, Xqt, Oblanco79, Alter-paule, Beast1978, Un1tY, Zkhalido, Hook696, Daryl-TTMG, RomaAmorRoma, E.S.A-Sheild, WDoranWMF, Kent7301, Meekrab2012, joker88john, Viztor, DannyS712, CucyNoiD, NebulousIris, Wenyi, Gaboe420, Versusxo, Majesticalreaper22, Amorymeltzer, Giuliamocci, Adrian1985, Cpaulf30, Af420, Darkminds3113, Bsandipan, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Tbscho, MayS, Sethakill, WSH1906, Lewizho99, Mdupont, JJMC89, Maathavan, dg711, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy, Legoktm
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
