Gerrit 3.7 usp query strings

31 views
Skip to first unread message

Clark Boylan

unread,
Apr 11, 2023, 12:58:04 PM4/11/23
to Repo and Gerrit Discussion
We recently upgraded from Gerrit 3.6.4 to 3.7.2. One of the things our
users have noticed is that urls in Gerrit emails contain a ?usp=email
query string in them. Digging a bit into the code turns up that this
is an intentional inclusion to the emails and since the change applies
to the variable outside of the templates themselves we cannot update
the templates to remove them [0].

Looking further this parameter appears to be used to log where users
originate from when they access changes [1]. Other possible values
I've found include 'service-worker-notification', 'metadata' ,
'related-change', dashboard and search names/terms, and so on. What I
haven't been able to sort out is how these values are consumed. It
doesn't seem like opening a change with usp set to 'email' or
'related-change' or 'submitted-together' changes the behavior of the
change screen.

Would it be possible to offer some insight into how this is used by
Gerrit? In particular there is concern that we may be adding user
tracking and clarification would be helpful.

[0] https://gerrit.googlesource.com/gerrit/+/refs/heads/stable-3.7/java/com/google/gerrit/server/mail/send/ChangeEmail.java#256
[1] https://gerrit.googlesource.com/gerrit/+/refs/heads/stable-3.7/polygerrit-ui/app/models/views/change.ts#58

Ben Rohlfs

unread,
Apr 12, 2023, 4:21:38 AM4/12/23
to Clark Boylan, Repo and Gerrit Discussion, Milutin Kristofic
The `usp` parameter is consumed here:
https://cs.opensource.google/gerrit/gerrit/gerrit/+/master:polygerrit-ui/app/elements/core/gr-router/gr-router.ts;l=583;drc=71067549eca363a17f8affdef44a3b8b579c032f

This will result in an event being dispatched here:

You can optionally install a javascript plugin that listens to these events and send them somewhere. But Gerrit releases don't contain such a plugin and AFAIK there is no such plugin available publicly, because the implementation would have to be customer specific.

So your users can be assured that no such tracking is happening.

-Ben





--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/CAAcH74jQjgHVSXOKHYfsRBrZV-PmBPV6igME%2BcErO%2BzjcuiF5g%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages