Disable deprecated /query API by default The usage of /query was deprecated back in 2012 by commit 6bd04fd2 and by now we have a REST API to cover this functionality. Change-Id: I43f5b2c4d645861277a8c87d03f6b5f3f4682bdc Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index 50686d2..5a08698 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt
@@ -2999,7 +2999,7 @@ + If true the deprecated `/query` URL is available to return JSON and text results for changes. If false, the URL is disabled and -returns 404 to clients. Default is true, enabling `/query`. +returns 404 to clients. Default is false, disabling `/query`. [[ssh-alias]] === Section ssh-alias
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/UrlModule.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/UrlModule.java index 4651959..a5d61f7 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/UrlModule.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/UrlModule.java
@@ -58,7 +58,7 @@ @Inject UrlConfig(@GerritServerConfig Config cfg) { - deprecatedQuery = cfg.getBoolean("site", "enableDeprecatedQuery", true); + deprecatedQuery = cfg.getBoolean("site", "enableDeprecatedQuery", false); } }