[Pywikipedia-bugs] [Maniphest] [Commented On] T187635: KeyError when log event content is hidden

2018-04-05 Thread zhuyifei1999
zhuyifei1999 added a comment.
Is this 'Fixed' now?TASK DETAILhttps://phabricator.wikimedia.org/T187635EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: zhuyifei1999Cc: gerritbot, Xqt, Framawiki, zhuyifei1999, Aklapper, pywikibot-bugs-list, JJMC89, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Baloch007, Darkminds3113, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, rafidaslam, MayS, Lewizho99, Mdupont, Maathavan, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T187635: KeyError when log event content is hidden

2018-04-05 Thread gerritbot
gerritbot added a comment.
Change 421805 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] LogDict: Raise HiddenKeyError when a key is hidden

https://gerrit.wikimedia.org/r/421805TASK DETAILhttps://phabricator.wikimedia.org/T187635EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Xqt, Framawiki, zhuyifei1999, Aklapper, pywikibot-bugs-list, JJMC89, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Baloch007, Darkminds3113, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, rafidaslam, MayS, Lewizho99, Mdupont, Maathavan, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T187635: KeyError when log event content is hidden

2018-04-04 Thread JJMC89
JJMC89 added a comment.
@Xqt

API request{
	"action": "query",
	"format": "json",
	"list": "logevents",
	"letype": "delete"
}

One event in response while logged out{
"logid":339405,
"actionhidden":"",
"type":"delete",
"action":"delete",
"user":"Example",
"timestamp":"2016-03-21T00:00:00Z",
"commenthidden":""
}

Above as a sysop{
"logid":339405,
"actionhidden":"",
"ns":0,
"title":"Order 1-(3-methylphenyl)-2-(methylamino)propan-1-one (3mmc)",
"pageid":0,
"type":"delete",
"action":"delete",
"user":"Example",
"timestamp":"2016-03-21T00:00:00Z",
"commenthidden":"",
"comment":"content was: \"{{Spam || Splitting Bad displays that undesireable effects your drug offers, in addition issues, but the issues your some one will get straight into with regards to that not too very good guys and also the legislation. [https://schengenl...\""
}

The comment and action are hidden, and the comment and action are in the API response when requested as a sysop.TASK DETAILhttps://phabricator.wikimedia.org/T187635EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: JJMC89Cc: gerritbot, Xqt, Framawiki, zhuyifei1999, Aklapper, pywikibot-bugs-list, JJMC89, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Baloch007, Darkminds3113, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, rafidaslam, MayS, Lewizho99, Mdupont, Maathavan, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T187635: KeyError when log event content is hidden

2018-03-25 Thread gerritbot
gerritbot added a comment.
Change 421805 had a related patch set uploaded (by JJMC89; owner: JJMC89):
[pywikibot/core@master] [IMPR] LogDict: Raise UserRightsError when part of a log event is hidden

https://gerrit.wikimedia.org/r/421805TASK DETAILhttps://phabricator.wikimedia.org/T187635EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, Xqt, Framawiki, zhuyifei1999, Aklapper, pywikibot-bugs-list, JJMC89, Magul, Tbscho, rafidaslam, MayS, Mdupont, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T187635: KeyError when log event content is hidden

2018-02-27 Thread Xqt
Xqt added a comment.

In T187635#4005048, @JJMC89 wrote:

In T187635#4000853, @Xqt wrote:
See also T78152


I guess this is a duplicate of that.


It isn’t. This couldn’t be solved by the other patch. But it is similar due to hidden information.TASK DETAILhttps://phabricator.wikimedia.org/T187635EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: XqtCc: Xqt, Framawiki, zhuyifei1999, Aklapper, pywikibot-bugs-list, JJMC89, Magul, Tbscho, rafidaslam, MayS, Mdupont, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T187635: KeyError when log event content is hidden

2018-02-26 Thread JJMC89
JJMC89 added a comment.

In T187635#4000853, @Xqt wrote:
See also T78152


I guess this is a duplicate of that.




In T187635#4000936, @Xqt wrote:

In T187635#3981304, @JJMC89 wrote:
Can this be handled gracefully in Pywikibot?


Sure. What would be a gracefull response?


When attempting to access data from a log event the API response data should be checked for keys that indicate the data is hidden/suppressed. If the relevant key (see below) is present and the user doesn't have the rights to view it (it will not be in the response), raise an exception like UserRightsError.

From mw:API:Logevents#Results:


actionhidden: Boolean indicating the title was hidden. ns and title will be absent if the user has no sufficient rights to view deleted log entries.
commenthidden: Boolean indicating the comment was hidden. comment will be absent if the user has no sufficient rights to view deleted log entries.
userhidden: Boolean indicating the user was hidden. user and userid will be absent if the user has no sufficient rights to view deleted log entries.
suppressed: Boolean indicating details were supressed. Only users with the suppressrevision can view them.


actionhidden also hides params.



This would also apply to trying to get hidden/suppressed data about a revision.


texthidden: Boolean indicating the text was hidden.
userhidden: Boolean indicating the user was hidden. user and userid will be absent if the user has no sufficient rights to view deleted log entries.
commenthidden: Boolean indicating the comment was hidden. comment will be absent if the user has no sufficient rights to view deleted log entries.
suppressed: Boolean indicating details were supressed. Only users with the suppressrevision can view them.
TASK DETAILhttps://phabricator.wikimedia.org/T187635EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: JJMC89Cc: Xqt, Framawiki, zhuyifei1999, Aklapper, pywikibot-bugs-list, JJMC89, Magul, Tbscho, rafidaslam, MayS, Mdupont, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T187635: KeyError when log event content is hidden

2018-02-17 Thread JJMC89
JJMC89 added a comment.

In T187635#3981324, @zhuyifei1999 wrote:
Do you have some minimum code to reproduce this issue?


I've added it to the task.TASK DETAILhttps://phabricator.wikimedia.org/T187635EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: JJMC89Cc: zhuyifei1999, Aklapper, pywikibot-bugs-list, JJMC89, Magul, Tbscho, rafidaslam, MayS, Mdupont, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T187635: KeyError when log event content is hidden

2018-02-17 Thread zhuyifei1999
zhuyifei1999 added a comment.
Do you have some minimum code to reproduce this issue?TASK DETAILhttps://phabricator.wikimedia.org/T187635EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: zhuyifei1999Cc: zhuyifei1999, Aklapper, pywikibot-bugs-list, JJMC89, Magul, Tbscho, rafidaslam, MayS, Mdupont, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs


[Pywikipedia-bugs] [Maniphest] [Commented On] T187635: KeyError when log event content is hidden

2018-02-17 Thread JJMC89
JJMC89 added a comment.
Can this be handled gracefully in Pywikibot?TASK DETAILhttps://phabricator.wikimedia.org/T187635EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: JJMC89Cc: Aklapper, pywikibot-bugs-list, JJMC89, Magul, Tbscho, rafidaslam, MayS, Mdupont, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy___
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs