| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
- Fix broken formatting in documentation
Change-Id: Ifb489fac38c83569c5d0a2b4bfa0630a3532ed74
|
|
|
|
| |
Change-Id: Iccf55eda1ec7ddfd4bce1f49659975a91d3d9304
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When 'trustContainerAuth' is enabled and proxy does authentication
on root (instead of '/login/'), ServletRequest#getRemoteUser is
null. In this case we need to pull the username from 'Authorization'
header. It is done the same way in HttpAuthFilter already.
Move username extraction logic from HttpAuthFilter to
RemoteUserUtil and add some tests.
Update javadoc to reflect current situation:
ContainerAuthFilter is also used for the REST API; see:
GitOverHttpModule#configureServlets: filter("/a/*").through(authFilter)
Change-Id: I0cf21fb7ecd8a958fad270704c11ebfffd9fea93
Bug: Issue 2209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some chunk of code in Gerrit is frequently passing a null AccountGroup.UUID
into the membership checker. For most Java collections (which memberships
looks like), .contains(null) is just gracefully false. Honor that behavior
by gracefully skipping a null UUID.
Continue to log any UUIDs which have no registered backends. These may be
errors caused by plugins not loading that an admin should pay attention to
and try to resolve.
Change-Id: Id0a24db6ac57574315cb93c76ad0e0f180d67352
(cherry picked from commit 74861171bc7bdaedd8febc333d082455208c7bcd)
|
|
|
|
| |
Change-Id: I3b8e81e3ff25d757cc82c9f13a211ac060363ec3
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a change is draft, the change status is correctly shown as
"Draft". However if a new patch set is uploaded as draft to an
already published change, the draft status is not considered.
Add checks for the status of the currently viewed patch set, and
show the status as "Draft" as appropriate.
Bug: Issue 3478
Change-Id: Ic2bd739050a85d4897819162e6eee4633888c53f
|
|\
| |
| |
| | |
into stable-2.11
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The listeners were being called before all project details had
been created and recorded.
Corresponding change in the cookbook plugin adds a sample listener
to demonstrate the behaviour.
Bug: Issue 3366
Change-Id: If1cf4053de7539e16a3d26a119a3406671e2e4ca
|
| |
| |
| |
| |
| |
| |
| |
| | |
I thought this functionality wasn't working, but while writing
this test I realised it was simply because my account had the
forge committer permission.
Change-Id: I1e5cf3b92ecbb2ba296cf9874c3350ea57a123ee
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| | |
The expected and actual values were passed in the wrong order,
resulting in confusing failure messages.
Change-Id: Ic283261fd5d6afd3c9988c04349785ea9d43da8f
|
|\ \
| | |
| | |
| | | |
stable-2.11
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the latest patch set of a change is a draft that is not visible to
the logged in user, clicking on the side by side diff link causes a
javascript error on the client.
Root cause is that the current_revision() method returns null in this
case.
Bug: Issue 3477
Change-Id: I0cd771ae8b42489f6d5bf374a6810b5812fcaf31
|
|\ \ \
| |/ /
|/| |
| | | |
stable-2.11
|
| |/
| |
| |
| |
| | |
Bug: Issue 3468
Change-Id: Ic594bfaef99b594a35a7426250d1dd0b500d4132
|
|/
|
|
| |
Change-Id: I0170250db39da68604053e6da23898c6f7e6d48a
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: issue 3505
Change-Id: I5d8977cbe09cefa8e598fcb2bd1204c487ae3560
|
|/
|
|
|
| |
Bug: issue 3504
Change-Id: I4b3b5607e8742c90ceb68e87c571df076cd82dad
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Submodule subscription would parse from the end of the url and return a
subscription to the first project it would find. Now, continue to parse
the url and subscribe to the project found with the most complete name.
Example:
Project "a/b" exists
Project "b" exists
Submodule subscription url = ../a/b
Old behaviour:
Would subscribe to project "b"
Expected:
Subscription to project "a/b"
Change-Id: I284b681d3098ff6ec2915fc90a047e2f329babfd
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Grappa library was chosen by Gitiles project to implement markdown
rendering. Grappa library includes non-relocated parboiled library
that is incompatible with vanilla parboiled library.
When Grappa driven gitiles-plugin is deployed in Gerrit, there is
a class collision. The only way to make them co-exist is to relocate
one of them, using JarJar utility. But doing it can be error prone
as this issue has shown: [2].
This change takes another approach and replace parboiled library in
Gerrit core with Grappa library. This fixed the deployment problem
with gitiles-plugin: markdown files rendering work as expected.
[1] https://github.com/fge/grappa
[2] https://github.com/sirthias/parboiled/issues/80
Change-Id: I793a84013468bf9fd07e62960bc2e789674ff35c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Chrome cannot render a 6,000 line file with syntax highlighting
when Render = Slow and Context = Whole File. The browser chokes
on the nearly 13,000 <div style='position:relative'> elements
created by CodeMirror to wrap around each line, in both sides.
Layout is so slow on Chrome that typing inside a DraftBox textarea
has 220ms lag between key presses.
Firefox and Safari have similar performance issues, but do manage
to keep up with typing slightly better than Chrome.
The original intent of this code was to disable Render=Slow on a
large file, but the conditional logic was broken. CodeMirror was
created anyway with viewportMargin: Infinity.
Fix the logic to disable the Render=Slow setting without changing
the user's preference.
Change-Id: Ic37a4343dfa98b08b6f76a1059e2dfd01d9af4cb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Modern versions of Chrome support a draft clipboard API from
JavaScript that allows copying without use of a Flash movie.
If the API appears to be available in the browser prefer it
over the Flash movie.
Leave the clippy.swf support in as ancient browsers are still
going to be around for many years and will continue to require
the Flash movie to put text on the clipboard.
Change-Id: I1984801c8fa9c398ea4edf762f700e4a50e1da61
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Clarify this only means the Flash plugin is installed in the browser.
It may be disabled by the user's preferences, or set to "click to run"
mode, where an empty gray box is displayed until the user clicks the
box to start the Flash content.
Change-Id: I1e12c8382ed6fea5dec449fce4b762b84e95e706
|
|/
|
|
|
|
|
| |
This is dead code since 2.8 (84275b24d6b3676b9eb).
Nothing listens to the event.
Change-Id: I4dfc5ee070c98f643f7a1090d7468074dd3530b2
|
|
|
|
|
|
|
|
| |
Fixes a bug [1] which prevented Gerrit startup under Java 8.
[1] https://github.com/google/guice/issues/904
Change-Id: Ie8be80351c06cef77e892725cc7a03663c4c4e02
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When, for example, adding accounts to a group the drop down list would
also suggest inactive accounts. Exclude the inactive accounts from the
suggestion.
NOTE: suggesting of reviewers doesn't have this issue as this is a
different code. Ideally, suggesting accounts and suggesting reviewers
should be refactored to use the same suggestion algorithm. However,
this would be a larger change and better suited for the master branch.
Change-Id: I6bd22739c326a77dbf6fc3f36ee245d9e6939e34
|
| |
| |
| |
| | |
Change-Id: If384e918fb7396ef2523524bdaee3d5f978897bd
|
|/
|
|
| |
Change-Id: Ib4ed99d0f5ea148c3ba04b2eedaa611e272cf977
|
|
|
|
| |
Change-Id: If4a6fed4ab665ec23c4c79e9777db446d3e5d0df
|
|
|
|
| |
Change-Id: I36d4f06a047992421b8eac1e937945b28439872c
|
|
|
|
|
|
|
|
|
|
|
|
| |
The OnlineReindexer.Factory is only bound in MultiVersionModule.
This causes some of the acceptance tests to fail with the error
"no implementation bound" because the SingleVersionModule is being
used, which does not bind OnlineReindexer.Factory.
Bind it in LuceneIndexModule instead, so it's used in both cases.
Change-Id: I6df22bb405621485e5dcba2a5d0e0a14de372f8a
|
|
|
|
|
|
|
| |
In case the online indexer fails, this allows the admins to activate
the latest index.
Change-Id: I59ebf2bce02a599b87d0f7771fc806ff64a3ba64
|
|
|
|
|
|
|
| |
In case the online indexer fails, this command allows admin to restart
it without having to restart Gerrit.
Change-Id: I73435de62c357537d173c5eafd6ad60d3b49fc73
|
|\
| |
| |
| | |
stable-2.11
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
RestApi helper class makes use of ActionContext that makes use of
RestApi in Gerrit core to route Rest calls. Because ActionContext was
optimized for invocations from JavaScript plugin hooks, it's converting
NativeString to String.
The easiest way to see why this behaviour is needed is to investigate
the call graph:
ActionButton => ActionContext.call() => ActionContext.get() =>
RestApiCore.get() => return NativeString.asString() =>
alert() called from JavaSrcipt that dump string content.
An example of this approach is implemented in cookbook-plugin:
1 function onSayHelloProject(c) {
2 var f = c.textfield();
3 var t = c.checkbox();
4 var b = c.button('Say hello', {onclick: function(){
5 c.call(
6 {message: f.value, french: t.checked},
7 function(r) {
8 c.hide();
9 window.alert(r);
10 c.refresh();
11 });
12 }});
Without this implicit conversion the output on the line 9 in the
example above would not be: "Hello dude..." but "[Object]".
While this implicit conversion is needed and correct in this use case,
when calling Rest API invocations from ActionButton, it is not wanted
and wrong when called from normal plugin screen through RestApiPlugin,
that makes itself use of the same implementation of ActionContext, to
route the RestAPI calls to RestApiCore implementation. The call graph:
PluginScreen => RestApiPlugin.get() => ActionContext.get() =>
RestApiCore.get() => return NativeString.asString() => type error
That's because in this use case, no implicit conversion should happen,
as the callback expects NativeString and not String, e.g.:
private void retrieveGerritVersion(final Screen screen) {
new RestApi("config").view("server").view("version")
.get(new AsyncCallback<NativeString>() {
@Override
public void onSuccess(NativeString r) {
screen.setPageTitle("cookbook index@" + r.asString());
}
[...]
Conclusion: while correct and expected in one use case, it's wrong and
leads to breakage in another use case. To rectify it, avoid conversion
when called from RestApiPlugin, as it's never wanted:
PluginScreen => RestApiPlugin.get() => ActionContext.get2() =>
RestApiCore.get() => return NativeString
The same problem is fixed for the other Rest methods
{put|post|delete}.
Change-Id: Id6c042478cab797838c1808602712a48039ec062
|
|\ \
| | |
| | |
| | | |
DefaultCommandModule" into stable-2.11
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Without this fix, corporate /global gerrit users (like ours) can still
use ssh despite the latter commands being disabled by instance admins.
That keeps the ssh door wide open, while only the http one shall work.
(Such deployments are then unable to restrain ssh traffic.)
Change Daemon and WebAppInitializer so they construct
DefaultCommandModule with the DownloadConfig singleton.
DefaultCommandModule can then use the latter to skip the binding of the
git ssh (receive and upload) commands, if ssh [download] scheme is
not enabled in gerrit.config.
Change-Id: Ica4e0ffeea1f34bc5411b6863a90fb0450c9e874
|
|\ \
| | |
| | |
| | | |
stable-2.11
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the refs/meta/config branch is modified using the PutConfig REST
endpoint (e.g. when changing the project configuration in the web UI)
the commit date/time is wrong. Instead of the actual date/time the
date/time of the last Gerrit server start is used. This is because
MetaDataUpdate.User which gets the GerritPersonIdent injected is kept
as member in the PutConfig singleton and the date/time for commits in
the refs/meta/config branch is retrieved from that GerritPersonIdent
instance which is only created once when the PutConfig singleton is
instantiated.
Bug: Issue 3371
Change-Id: I85424db74e8609c8e4117e8db78a80730c29ace1
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Do a null check before getting the change from change data.
A null pointer exception was reported when getting related changes [1].
The change that introduced this vulnerability is [2].
[1] https://groups.google.com/forum/#!topic/repo-discuss/3oS_ynJqGjo
[2] https://gerrit-review.googlesource.com/#/c/63221
Change-Id: I9ca2616492f665044e757a1c0d5dd604c29b21cc
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: If027fb113d3cf265dfe84e32898fff1b0f1e48f7
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The "/a" prefix is used to trigger authentication but was not removed
from the request's pathInfo. Therefore, it was included in the project
name and hence the project wasn't found when performing, for examples:
$ git fetch http://server/a/project
Change-Id: I9eadd5759d5936f040431ebbb401c35c437f537e
|
|/ /
| |
| |
| |
| | |
Change-Id: I4b70901816a10723bfd102400f7f7bfe1c984860
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
* stable-2.10:
Update version to 2.10.6
Release notes for Gerrit 2.10.6
Change-Id: I9bc2d68bbfe5f19081e8c7b26ca509628dd19c28
|
| |
| |
| |
| | |
Change-Id: I2e41f2b6044563f4f63324fa50ad8ed3145d8c24
|
| |
| |
| |
| | |
Change-Id: I49b5094db78ca28e0ae56732670e9f0f62b310b2
|