Closed Bug 1027037 Opened 10 years ago Closed 10 years ago

history.changer is not a full email address

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: kohei, Assigned: dkl)

Details

Attachments

(1 file)

https://api-dev.bugzilla.mozilla.org/latest/bug?id=1026400&include_fields=id,history
https://bugzilla.mozilla.org/bzapi/bug?id=1026400&include_fields=id,history

In the legacy BzAPI, history.changer is a full email address (account name) even when without auth, though other fields don't expose it.
My BzDeck app shows a Gravatar on each comment with any change, like this pic:

https://twitter.com/BzDeck/status/474965373079814144/photo/1

Actually the native REST API or Web Service exposes full email addresses everywhere even when without auth, so I don't know why only BzAPI has such a limitation, but this bug is all about compatibility.

https://bugzilla.mozilla.org/rest/bug/1026400/history
(In reply to Kohei Yoshino [:kohei] from comment #0)
> https://api-dev.bugzilla.mozilla.org/latest/bug?id=1026400&include_fields=id,
> history
> https://bugzilla.mozilla.org/bzapi/bug?id=1026400&include_fields=id,history
> 
> In the legacy BzAPI, history.changer is a full email address (account name)
> even when without auth, though other fields don't expose it.

There are some inconsistencies in the BzAPI that I am having to work around and that will be one I will need to add a fix for as well. Other emails are filtered if not logged in whereas the full email id displayed for history data. Will work on a patch.

(In reply to Kohei Yoshino [:kohei] from comment #1)
> Actually the native REST API or Web Service exposes full email addresses
> everywhere even when without auth, so I don't know why only BzAPI has such a
> limitation, but this bug is all about compatibility.
> 
> https://bugzilla.mozilla.org/rest/bug/1026400/history

Yeah that is because we have email filtering turned off currently for webservices so all native REST API calls will show full email when logged out.

dkl
Attached patch 1027037_1.patchSplinter Review
Assignee: nobody → dkl
Status: NEW → ASSIGNED
Attachment #8442340 - Flags: review?(glob)
Comment on attachment 8442340 [details] [diff] [review]
1027037_1.patch

Review of attachment 8442340 [details] [diff] [review]:
-----------------------------------------------------------------

r=glob

::: extensions/BzAPI/lib/Util.pm
@@ +287,4 @@
>  
>      if ($data->{who}) {
>          $data->{changer} = {
> +            name => $data->{who},

should be $rpc->type('string', $data->{who})
Attachment #8442340 - Flags: review?(glob) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   c672983..0f3bf07  master -> master
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Component: Extensions: BzAPI Compatibility → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: