commit | 7e5c52a588e9106e00c422c3f6d995a265fbb3c9 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Thu Feb 16 17:45:12 2023 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Mon Feb 20 09:18:46 2023 +0100 |
tree | f4bfbca0565d017deb1cfdaa1335390b32de97bd | |
parent | 65b473790d72ca204b2311da3fd2aa779f2a9274 [diff] |
Check permissions when resolving accounts by secondary emails The ByEmail searcher in AccountResolver resolved secondary emails without checking whether the user has the Modify Account capability that is required for being able to see secondary emails of other users. Due to this it was possible to: * Resolve a non-visible secondary email through the accounts API, e.g.: GET /accounts/<seondary-email>/detail * Query changes by a non-visible secondary email, e.g query changes that are owned/uploaded/reviewed by the account that owns the secondary email. The visibility of the resolved accounts is checked in both cases, so resolving a non-visible secondary email only worked when the account owning it was visible. A partial fix for the same issue had already been done by change Ic0f36127a, but this fix missed to check the permission in the ByEmail searcher (the ByEmail searcher is only used if the input contains '@', hence the tests that were added by the fix change didn't catch this). With this change AccountResolver resolves secondary emails for other accounts only if the user has the Modify Account capability. Secondary emails of the own account are always visible and hence always resolved. Release-Notes: Check permissions when resolving accounts by secondary emails Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I799bf1c57eb84549cba6d7ff462c04cef90fc63b Signed-off-by: Edwin Kempin <ekempin@google.com>
Gerrit is a code review and project management tool for Git based projects.
Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer.
Gerrit simplifies Git based project maintainership by permitting any authorized user to submit changes to the master Git repository, rather than requiring all approved changes to be merged in by hand by the project maintainer.
For information about how to install and use Gerrit, refer to the documentation.
Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.
Please report bugs on the issue tracker.
Gerrit is the work of hundreds of contributors. We appreciate your help!
Please read the contribution guidelines.
Note that we do not accept Pull Requests via the Github mirror.
The Developer Mailing list is repo-discuss on Google Groups.
Gerrit is provided under the Apache License 2.0.
Install Bazel and run the following:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit && bazel build release
The instruction how to configure GerritForge/BinTray repositories is here
On Debian/Ubuntu run:
apt-get update && apt-get install gerrit=<version>-<release>
NOTE: release is a counter that starts with 1 and indicates the number of packages that have been released with the same version of the software.
On CentOS/RedHat run:
yum clean all && yum install gerrit-<version>[-<release>]
On Fedora run:
dnf clean all && dnf install gerrit-<version>[-<release>]
Docker images of Gerrit are available on DockerHub
To run a CentOS 8 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-centos8
To run a Ubuntu 20.04 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-ubuntu20
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.