You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2017/10/13 11:55:38 UTC

lucene-solr:branch_7_1: SOLR-11482: RunExecutableListener was removed for security reasons

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7_1 aed571cdf -> 1979b7efe


SOLR-11482: RunExecutableListener was removed for security reasons


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1979b7ef
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1979b7ef
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1979b7ef

Branch: refs/heads/branch_7_1
Commit: 1979b7efec523fd2b9fbabcdf004c22435c2c40e
Parents: aed571c
Author: Uwe Schindler <us...@apache.org>
Authored: Fri Oct 13 13:48:18 2017 +0200
Committer: Uwe Schindler <us...@apache.org>
Committed: Fri Oct 13 13:54:58 2017 +0200

----------------------------------------------------------------------
 solr/CHANGES.txt                                |   7 +
 .../solr/collection1/conf/solrconfig.xml        |  25 ----
 .../solr/collection1/conf/solrconfig.xml        |  18 ---
 .../uima/solr/collection1/conf/solrconfig.xml   |  25 ----
 .../uima/uima-tokenizers-solrconfig.xml         |  27 +---
 .../apache/solr/core/RunExecutableListener.java | 148 -------------------
 .../conf/solrconfig-analytics-query.xml         |  17 ---
 .../conf/solrconfig-collapseqparser.xml         |  17 ---
 .../collection1/conf/solrconfig-elevate.xml     |  17 ---
 .../conf/solrconfig-plugcollector.xml           |  16 --
 .../solr/collection1/conf/solrconfig.xml        |  17 ---
 .../configsets/_default/conf/solrconfig.xml     |  23 ---
 .../with-run-executable-listener/managed-schema |  25 ----
 .../with-run-executable-listener/solrconfig.xml |  69 ---------
 .../apache/solr/cloud/TestConfigSetsAPI.java    |  12 --
 .../example-DIH/solr/db/conf/solrconfig.xml     |  23 ---
 .../example-DIH/solr/mail/conf/solrconfig.xml   |  23 ---
 .../example-DIH/solr/solr/conf/solrconfig.xml   |  23 ---
 solr/example/files/conf/solrconfig.xml          |  23 ---
 .../configsets/_default/conf/solrconfig.xml     |  23 ---
 .../conf/solrconfig.xml                         |  23 ---
 solr/solr-ref-guide/src/configsets-api.adoc     |   1 -
 .../src/updatehandlers-in-solrconfig.adoc       |  18 +--
 23 files changed, 10 insertions(+), 610 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 1ed302b..17f76fc 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -60,6 +60,10 @@ Upgrade Notes
 * SOLR-10962: in the ReplicationHandler the master.commitReserveDuration sub-element is deprecated. Instead
   please configure a direct commitReserveDuration element for use in all modes (master, slave, cloud).
 
+* SOLR-11482: RunExecutableListener was removed for security reasons. If you want to listen to
+  events caused by updates, commits, or optimize, write your own listener as native Java class
+  as part of a Solr plugin.
+
 New Features
 ----------------------
 * SOLR-10339: New set-trigger and remove-trigger APIs for autoscaling. (shalin)
@@ -328,6 +332,9 @@ Other Changes
 * SOLR-11306: Fix inaccurate comments on docValues and StrField in the example schemas
   (Tom Burton-West, Jason Gerlowski, Varun Thacker)
 
+* SOLR-11482: RunExecutableListener was removed for security reasons.  (Michael Stepankin,
+  Olga Barinova, Uwe Schindler, Tomás Fernández Löbbe)
+
 ==================  7.0.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml
index 8d0f82e..5ff4254 100644
--- a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml
+++ b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml
@@ -63,31 +63,6 @@
     </autoCommit>
     -->
 
-    <!-- The RunExecutableListener executes an external command.
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. default="."
-         wait - the calling thread waits until the executable returns. default="true"
-         args - the arguments to pass to the program.  default=nothing
-         env - environment variables to set.  default=nothing
-      -->
-    <!-- A postCommit event is fired after every commit or optimize command
-    <listener event="postCommit" class="solr.RunExecutableListener">
-      <str name="exe">solr/bin/snapshooter</str>
-      <str name="dir">.</str>
-      <bool name="wait">true</bool>
-      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-      <arr name="env"> <str>MYVAR=val1</str> </arr>
-    </listener>
-    -->
-    <!-- A postOptimize event is fired only after every optimize command, useful
-         in conjunction with index distribution to only distribute optimized indicies 
-    <listener event="postOptimize" class="solr.RunExecutableListener">
-      <str name="exe">snapshooter</str>
-      <str name="dir">solr/bin</str>
-      <bool name="wait">true</bool>
-    </listener>
-    -->
-
   </updateHandler>
 
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml b/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
index 4dbf082..faffeb8 100644
--- a/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
+++ b/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/solrconfig.xml
@@ -40,24 +40,6 @@
     </autoCommit>
     -->
 
-    <!-- The RunExecutableListener executes an external command.
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. default="."
-         wait - the calling thread waits until the executable returns. default="true"
-         args - the arguments to pass to the program.  default=nothing
-         env - environment variables to set.  default=nothing
-      -->
-    <!-- A postCommit event is fired after every commit
-    <listener event="postCommit" class="solr.RunExecutableListener">
-      <str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
-      <str name="dir">/var/opt/resin3/__PORT__</str>
-      <bool name="wait">true</bool>
-      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-      <arr name="env"> <str>MYVAR=val1</str> </arr>
-    </listener>
-    -->
-
-
   </updateHandler>
 
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/solrconfig.xml b/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/solrconfig.xml
index 96392d3..776de39 100644
--- a/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/solrconfig.xml
+++ b/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/solrconfig.xml
@@ -101,31 +101,6 @@
       </autoCommit>
     -->
 
-
-    <!--
-      The RunExecutableListener executes an external command from a hook
-      such as postCommit or postOptimize. exe - the name of the
-      executable to run dir - dir to use as the current working
-      directory. default="." wait - the calling thread waits until the
-      executable returns. default="true" args - the arguments to pass to
-      the program. default=nothing env - environment variables to set.
-      default=nothing
-    -->
-    <!--
-      A postCommit event is fired after every commit or optimize command
-      <listener event="postCommit" class="solr.RunExecutableListener">
-      <str name="exe">solr/bin/snapshooter</str> <str name="dir">.</str>
-      <bool name="wait">true</bool> <arr name="args"> <str>arg1</str>
-      <str>arg2</str> </arr> <arr name="env"> <str>MYVAR=val1</str>
-      </arr> </listener>
-    -->
-    <!--
-      A postOptimize event is fired only after every optimize command
-      <listener event="postOptimize" class="solr.RunExecutableListener">
-      <str name="exe">snapshooter</str> <str name="dir">solr/bin</str>
-      <bool name="wait">true</bool> </listener>
-    -->
-
   </updateHandler>
 
   <!--

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml b/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml
index df7dc1e..55cd3fa 100644
--- a/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml
+++ b/solr/contrib/uima/src/test-files/uima/uima-tokenizers-solrconfig.xml
@@ -99,32 +99,7 @@
       <autoCommit> <maxDocs>10000</maxDocs> <maxTime>1000</maxTime>
       </autoCommit>
     -->
-
-
-    <!--
-      The RunExecutableListener executes an external command from a hook
-      such as postCommit or postOptimize. exe - the name of the
-      executable to run dir - dir to use as the current working
-      directory. default="." wait - the calling thread waits until the
-      executable returns. default="true" args - the arguments to pass to
-      the program. default=nothing env - environment variables to set.
-      default=nothing
-    -->
-    <!--
-      A postCommit event is fired after every commit or optimize command
-      <listener event="postCommit" class="solr.RunExecutableListener">
-      <str name="exe">solr/bin/snapshooter</str> <str name="dir">.</str>
-      <bool name="wait">true</bool> <arr name="args"> <str>arg1</str>
-      <str>arg2</str> </arr> <arr name="env"> <str>MYVAR=val1</str>
-      </arr> </listener>
-    -->
-    <!--
-      A postOptimize event is fired only after every optimize command
-      <listener event="postOptimize" class="solr.RunExecutableListener">
-      <str name="exe">snapshooter</str> <str name="dir">solr/bin</str>
-      <bool name="wait">true</bool> </listener>
-    -->
-
+    
   </updateHandler>
 
   <!--

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/core/src/java/org/apache/solr/core/RunExecutableListener.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/RunExecutableListener.java b/solr/core/src/java/org/apache/solr/core/RunExecutableListener.java
deleted file mode 100644
index c6d0090..0000000
--- a/solr/core/src/java/org/apache/solr/core/RunExecutableListener.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.core;
-
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.SolrException.ErrorCode;
-import org.apache.solr.common.util.NamedList;
-import org.apache.solr.search.SolrIndexSearcher;
-import org.apache.solr.util.plugin.SolrCoreAware;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.invoke.MethodHandles;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- */
-class RunExecutableListener extends AbstractSolrEventListener implements SolrCoreAware {
-  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-  
-  public RunExecutableListener(SolrCore core) {
-    super(core);
-  }
-  protected String[] cmd;
-  protected File dir;
-  protected String[] envp;
-  protected boolean wait=true;
-
-  @Override
-  public void init(NamedList args) {
-    super.init(args);
-
-    List cmdlist = new ArrayList();
-    cmdlist.add(args.get("exe"));
-    List lst = (List)args.get("args");
-    if (lst != null) cmdlist.addAll(lst);
-    cmd = (String[])cmdlist.toArray(new String[cmdlist.size()]);
-
-    lst = (List)args.get("env");
-    if (lst != null) {
-      envp = (String[])lst.toArray(new String[lst.size()]);
-    }
-
-    String str = (String)args.get("dir");
-    if (str==null || str.equals("") || str.equals(".") || str.equals("./")) {
-      dir = null;
-    } else {
-      dir = new File(str);
-    }
-
-    if ("false".equals(args.get("wait")) || Boolean.FALSE.equals(args.get("wait"))) wait=false;
-  }
-
-  @Override
-  public void inform(SolrCore core) {
-    if (!core.getCoreDescriptor().isConfigSetTrusted()) {
-      throw new SolrException(ErrorCode.UNAUTHORIZED, "The configset for this collection was uploaded without any authentication in place,"
-          + " and this operation is not available for collections with untrusted configsets. To have this component, re-upload the configset"
-          + " after enabling authentication and authorization.");
-    }
-  }
-
-  /**
-   * External executable listener.
-   * 
-   * @param callback Unused (As of solr 1.4-dev)
-   * @return Error code indicating if the command has executed successfully. <br />
-   *  0 , indicates normal termination.<br />
-   *  non-zero , otherwise.
-   */
-  protected int exec(String callback) {
-    int ret = 0;
-
-    try {
-      boolean doLog = log.isDebugEnabled();
-      if (doLog) {
-        log.debug("About to exec " + cmd[0]);
-      }
-      final Process proc;
-      try {
-        proc = Runtime.getRuntime().exec(cmd, envp ,dir);
-      } catch (Error err) {
-        // Create better error message
-        if (err.getMessage() != null && (err.getMessage().contains("posix_spawn") || err.getMessage().contains("UNIXProcess"))) {
-          Error newErr = new Error("Error forking command due to JVM locale bug (see https://issues.apache.org/jira/browse/SOLR-6387): " + err.getMessage());
-          newErr.setStackTrace(err.getStackTrace());
-          err = newErr;
-        }
-        throw err;
-      }
-
-      if (wait) {
-        try {
-          ret = proc.waitFor();
-        } catch (InterruptedException e) {
-          SolrException.log(log,e);
-          ret = INVALID_PROCESS_RETURN_CODE;
-        }
-      }
-
-      if (wait && doLog) {
-        log.debug("Executable " + cmd[0] + " returned " + ret);
-      }
-
-    } catch (IOException e) {
-      // don't throw exception, just log it...
-      SolrException.log(log,e);
-      ret = INVALID_PROCESS_RETURN_CODE;
-    }
-
-    return ret;
-  }
-
-
-  @Override
-  public void postCommit() {
-    // anything generic need to be passed to the external program?
-    // the directory of the index?  the command that caused it to be
-    // invoked?  the version of the index?
-    exec("postCommit");
-  }
-
-  @Override
-  public void newSearcher(SolrIndexSearcher newSearcher, SolrIndexSearcher currentSearcher) {
-    exec("newSearcher");
-  }
-
-  /** Non-zero value for an invalid return code **/
-  private static int INVALID_PROCESS_RETURN_CODE = -1;
-
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml
index fc33e46..b967c0d 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-analytics-query.xml
@@ -62,23 +62,6 @@
     </autoCommit>
     -->
 
-    <!-- The RunExecutableListener executes an external command.
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. default="."
-         wait - the calling thread waits until the executable returns. default="true"
-         args - the arguments to pass to the program.  default=nothing
-         env - environment variables to set.  default=nothing
-      -->
-    <!-- A postCommit event is fired after every commit
-    <listener event="postCommit" class="solr.RunExecutableListener">
-      <str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
-      <str name="dir">/var/opt/resin3/__PORT__</str>
-      <bool name="wait">true</bool>
-      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-      <arr name="env"> <str>MYVAR=val1</str> </arr>
-    </listener>
-    -->
-
     <updateLog enable="${enable.update.log:true}">
       <str name="dir">${solr.ulog.dir:}</str>
     </updateLog>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml
index 65820e0..1edaa86 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml
@@ -62,23 +62,6 @@
     </autoCommit>
     -->
 
-    <!-- The RunExecutableListener executes an external command.
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. default="."
-         wait - the calling thread waits until the executable returns. default="true"
-         args - the arguments to pass to the program.  default=nothing
-         env - environment variables to set.  default=nothing
-      -->
-    <!-- A postCommit event is fired after every commit
-    <listener event="postCommit" class="solr.RunExecutableListener">
-      <str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
-      <str name="dir">/var/opt/resin3/__PORT__</str>
-      <bool name="wait">true</bool>
-      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-      <arr name="env"> <str>MYVAR=val1</str> </arr>
-    </listener>
-    -->
-
     <updateLog enable="${enable.update.log:true}">
       <str name="dir">${solr.ulog.dir:}</str>
     </updateLog>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
index 083333c..1c8e10f 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml
@@ -43,23 +43,6 @@
     </autoCommit>
     -->
 
-    <!-- The RunExecutableListener executes an external command.
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. default="."
-         wait - the calling thread waits until the executable returns. default="true"
-         args - the arguments to pass to the program.  default=nothing
-         env - environment variables to set.  default=nothing
-      -->
-    <!-- A postCommit event is fired after every commit
-    <listener event="postCommit" class="solr.RunExecutableListener">
-      <str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
-      <str name="dir">/var/opt/resin3/__PORT__</str>
-      <bool name="wait">true</bool>
-      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-      <arr name="env"> <str>MYVAR=val1</str> </arr>
-    </listener>
-    -->
-
   </updateHandler>
 
   <query>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
index 431447c..25071a5 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-plugcollector.xml
@@ -60,22 +60,6 @@
       <maxTime>3600000</maxTime>
     </autoCommit>
     -->
-    <!-- The RunExecutableListener executes an external command.
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. default="."
-         wait - the calling thread waits until the executable returns. default="true"
-         args - the arguments to pass to the program.  default=nothing
-         env - environment variables to set.  default=nothing
-      -->
-    <!-- A postCommit event is fired after every commit
-    <listener event="postCommit" class="solr.RunExecutableListener">
-      <str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
-      <str name="dir">/var/opt/resin3/__PORT__</str>
-      <bool name="wait">true</bool>
-      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-      <arr name="env"> <str>MYVAR=val1</str> </arr>
-    </listener>
-    -->
 
     <updateLog enable="${enable.update.log:true}">
       <str name="dir">${solr.ulog.dir:}</str>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
index 9422a4d..2937aae 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
@@ -73,23 +73,6 @@
       <maxTime>3600000</maxTime>
     </autoCommit>
     -->
-
-    <!-- The RunExecutableListener executes an external command.
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. default="."
-         wait - the calling thread waits until the executable returns. default="true"
-         args - the arguments to pass to the program.  default=nothing
-         env - environment variables to set.  default=nothing
-      -->
-    <!-- A postCommit event is fired after every commit
-    <listener event="postCommit" class="solr.RunExecutableListener">
-      <str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
-      <str name="dir">/var/opt/resin3/__PORT__</str>
-      <bool name="wait">true</bool>
-      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-      <arr name="env"> <str>MYVAR=val1</str> </arr>
-    </listener>
-    -->
     
     <updateLog enable="${enable.update.log:true}">
       <str name="dir">${solr.ulog.dir:}</str>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/core/src/test-files/solr/configsets/_default/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/configsets/_default/conf/solrconfig.xml b/solr/core/src/test-files/solr/configsets/_default/conf/solrconfig.xml
index 8172e52..b793836 100644
--- a/solr/core/src/test-files/solr/configsets/_default/conf/solrconfig.xml
+++ b/solr/core/src/test-files/solr/configsets/_default/conf/solrconfig.xml
@@ -331,29 +331,6 @@
          postCommit - fired after every commit or optimize command
          postOptimize - fired after every optimize command
       -->
-    <!-- The RunExecutableListener executes an external command from a
-         hook such as postCommit or postOptimize.
-
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. (default=".")
-         wait - the calling thread waits until the executable returns.
-                (default="true")
-         args - the arguments to pass to the program.  (default is none)
-         env - environment variables to set.  (default is none)
-      -->
-    <!-- This example shows how RunExecutableListener could be used
-         with the script based replication...
-         http://wiki.apache.org/solr/CollectionDistribution
-      -->
-    <!--
-       <listener event="postCommit" class="solr.RunExecutableListener">
-         <str name="exe">solr/bin/snapshooter</str>
-         <str name="dir">.</str>
-         <bool name="wait">true</bool>
-         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-         <arr name="env"> <str>MYVAR=val1</str> </arr>
-       </listener>
-      -->
 
   </updateHandler>
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/core/src/test-files/solr/configsets/upload/with-run-executable-listener/managed-schema
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/configsets/upload/with-run-executable-listener/managed-schema b/solr/core/src/test-files/solr/configsets/upload/with-run-executable-listener/managed-schema
deleted file mode 100644
index 9e2f947..0000000
--- a/solr/core/src/test-files/solr/configsets/upload/with-run-executable-listener/managed-schema
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<schema name="minimal" version="1.1">
- <types>
-  <fieldType name="string" class="solr.StrField"/>
- </types>
- <fields>
-   <dynamicField name="*" type="string" indexed="true" stored="true" />
- </fields>
-</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/core/src/test-files/solr/configsets/upload/with-run-executable-listener/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/configsets/upload/with-run-executable-listener/solrconfig.xml b/solr/core/src/test-files/solr/configsets/upload/with-run-executable-listener/solrconfig.xml
deleted file mode 100644
index 4683841..0000000
--- a/solr/core/src/test-files/solr/configsets/upload/with-run-executable-listener/solrconfig.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- This is a "kitchen sink" config file that tests can use.
-     When writting a new test, feel free to add *new* items (plugins,
-     config options, etc...) as long as they don't break any existing
-     tests.  if you need to test something esoteric please add a new
-     "solrconfig-your-esoteric-purpose.xml" config file.
-
-     Note in particular that this test is used by MinimalSchemaTest so
-     Anything added to this file needs to work correctly even if there
-     is now uniqueKey or defaultSearch Field.
-  -->
-
-<config>
-
-  <dataDir>${solr.data.dir:}</dataDir>
-
-  <directoryFactory name="DirectoryFactory"
-                    class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
-
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-
-  <updateHandler class="solr.DirectUpdateHandler2">
-    <commitWithin>
-      <softCommit>${solr.commitwithin.softcommit:true}</softCommit>
-    </commitWithin>
-
-    <listener event="postCommit" class="solr.RunExecutableListener">
-      <str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
-      <str name="dir">/var/opt/resin3/__PORT__</str>
-      <bool name="wait">true</bool>
-      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-      <arr name="env"> <str>MYVAR=val1</str> </arr>
-    </listener>
-
-  </updateHandler>
-  <requestHandler name="/select" class="solr.SearchHandler">
-    <lst name="defaults">
-      <str name="echoParams">explicit</str>
-      <str name="indent">true</str>
-      <str name="df">text</str>
-    </lst>
-
-  </requestHandler>
-
-  <requestHandler name="/update/xslt"
-                   startup="lazy"
-                   class="solr.XsltUpdateRequestHandler"/>
-
-  <requestHandler name="/update" class="solr.UpdateRequestHandler"  />
-</config>
-

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
index d59b6ea..374e27a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestConfigSetsAPI.java
@@ -328,18 +328,6 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 {
   }
   
   @Test
-  public void testUploadWithRunExecutableListener() throws Exception {
-    String suffix = "-untrusted";
-    uploadConfigSet("with-run-executable-listener", suffix, null, null);
-    // try to create a collection with the uploaded configset
-    CollectionAdminResponse resp = createCollection("newcollection3", "with-run-executable-listener" + suffix, 1, 1, solrCluster.getSolrClient());
-    log.info("Client saw errors: "+resp.getErrorMessages());
-    assertTrue(resp.getErrorMessages() != null && resp.getErrorMessages().size() > 0);
-    assertTrue(resp.getErrorMessages().getVal(0).
-        contains("The configset for this collection was uploaded without any authentication"));
-  }
-
-  @Test
   public void testUploadWithScriptUpdateProcessor() throws Exception {
     for (boolean withAuthorization: Arrays.asList(false, true)) {
       String suffix;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/example/example-DIH/solr/db/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/example/example-DIH/solr/db/conf/solrconfig.xml b/solr/example/example-DIH/solr/db/conf/solrconfig.xml
index 4437da1..275c086 100644
--- a/solr/example/example-DIH/solr/db/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/db/conf/solrconfig.xml
@@ -321,29 +321,6 @@
          postCommit - fired after every commit or optimize command
          postOptimize - fired after every optimize command
       -->
-    <!-- The RunExecutableListener executes an external command from a
-         hook such as postCommit or postOptimize.
-
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. (default=".")
-         wait - the calling thread waits until the executable returns.
-                (default="true")
-         args - the arguments to pass to the program.  (default is none)
-         env - environment variables to set.  (default is none)
-      -->
-    <!-- This example shows how RunExecutableListener could be used
-         with the script based replication...
-         http://wiki.apache.org/solr/CollectionDistribution
-      -->
-    <!--
-       <listener event="postCommit" class="solr.RunExecutableListener">
-         <str name="exe">solr/bin/snapshooter</str>
-         <str name="dir">.</str>
-         <bool name="wait">true</bool>
-         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-         <arr name="env"> <str>MYVAR=val1</str> </arr>
-       </listener>
-      -->
 
   </updateHandler>
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/example/example-DIH/solr/mail/conf/solrconfig.xml b/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
index 1c60400..47cbc70 100644
--- a/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
@@ -324,29 +324,6 @@
          postCommit - fired after every commit or optimize command
          postOptimize - fired after every optimize command
       -->
-    <!-- The RunExecutableListener executes an external command from a
-         hook such as postCommit or postOptimize.
-
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. (default=".")
-         wait - the calling thread waits until the executable returns.
-                (default="true")
-         args - the arguments to pass to the program.  (default is none)
-         env - environment variables to set.  (default is none)
-      -->
-    <!-- This example shows how RunExecutableListener could be used
-         with the script based replication...
-         http://wiki.apache.org/solr/CollectionDistribution
-      -->
-    <!--
-       <listener event="postCommit" class="solr.RunExecutableListener">
-         <str name="exe">solr/bin/snapshooter</str>
-         <str name="dir">.</str>
-         <bool name="wait">true</bool>
-         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-         <arr name="env"> <str>MYVAR=val1</str> </arr>
-       </listener>
-      -->
 
   </updateHandler>
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/example/example-DIH/solr/solr/conf/solrconfig.xml b/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
index b1eeafd..16a86b0 100644
--- a/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
@@ -321,29 +321,6 @@
          postCommit - fired after every commit or optimize command
          postOptimize - fired after every optimize command
       -->
-    <!-- The RunExecutableListener executes an external command from a
-         hook such as postCommit or postOptimize.
-
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. (default=".")
-         wait - the calling thread waits until the executable returns.
-                (default="true")
-         args - the arguments to pass to the program.  (default is none)
-         env - environment variables to set.  (default is none)
-      -->
-    <!-- This example shows how RunExecutableListener could be used
-         with the script based replication...
-         http://wiki.apache.org/solr/CollectionDistribution
-      -->
-    <!--
-       <listener event="postCommit" class="solr.RunExecutableListener">
-         <str name="exe">solr/bin/snapshooter</str>
-         <str name="dir">.</str>
-         <bool name="wait">true</bool>
-         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-         <arr name="env"> <str>MYVAR=val1</str> </arr>
-       </listener>
-      -->
 
   </updateHandler>
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/example/files/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/example/files/conf/solrconfig.xml b/solr/example/files/conf/solrconfig.xml
index 30a362f..365c78d 100644
--- a/solr/example/files/conf/solrconfig.xml
+++ b/solr/example/files/conf/solrconfig.xml
@@ -322,29 +322,6 @@
          postCommit - fired after every commit or optimize command
          postOptimize - fired after every optimize command
       -->
-    <!-- The RunExecutableListener executes an external command from a
-         hook such as postCommit or postOptimize.
-
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. (default=".")
-         wait - the calling thread waits until the executable returns.
-                (default="true")
-         args - the arguments to pass to the program.  (default is none)
-         env - environment variables to set.  (default is none)
-      -->
-    <!-- This example shows how RunExecutableListener could be used
-         with the script based replication...
-         http://wiki.apache.org/solr/CollectionDistribution
-      -->
-    <!--
-       <listener event="postCommit" class="solr.RunExecutableListener">
-         <str name="exe">solr/bin/snapshooter</str>
-         <str name="dir">.</str>
-         <bool name="wait">true</bool>
-         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-         <arr name="env"> <str>MYVAR=val1</str> </arr>
-       </listener>
-      -->
 
   </updateHandler>
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/server/solr/configsets/_default/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/server/solr/configsets/_default/conf/solrconfig.xml b/solr/server/solr/configsets/_default/conf/solrconfig.xml
index 8172e52..b793836 100644
--- a/solr/server/solr/configsets/_default/conf/solrconfig.xml
+++ b/solr/server/solr/configsets/_default/conf/solrconfig.xml
@@ -331,29 +331,6 @@
          postCommit - fired after every commit or optimize command
          postOptimize - fired after every optimize command
       -->
-    <!-- The RunExecutableListener executes an external command from a
-         hook such as postCommit or postOptimize.
-
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. (default=".")
-         wait - the calling thread waits until the executable returns.
-                (default="true")
-         args - the arguments to pass to the program.  (default is none)
-         env - environment variables to set.  (default is none)
-      -->
-    <!-- This example shows how RunExecutableListener could be used
-         with the script based replication...
-         http://wiki.apache.org/solr/CollectionDistribution
-      -->
-    <!--
-       <listener event="postCommit" class="solr.RunExecutableListener">
-         <str name="exe">solr/bin/snapshooter</str>
-         <str name="dir">.</str>
-         <bool name="wait">true</bool>
-         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-         <arr name="env"> <str>MYVAR=val1</str> </arr>
-       </listener>
-      -->
 
   </updateHandler>
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
index 9343a1f..9d8fb6f 100644
--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
@@ -336,29 +336,6 @@
          postCommit - fired after every commit or optimize command
          postOptimize - fired after every optimize command
       -->
-    <!-- The RunExecutableListener executes an external command from a
-         hook such as postCommit or postOptimize.
-
-         exe - the name of the executable to run
-         dir - dir to use as the current working directory. (default=".")
-         wait - the calling thread waits until the executable returns.
-                (default="true")
-         args - the arguments to pass to the program.  (default is none)
-         env - environment variables to set.  (default is none)
-      -->
-    <!-- This example shows how RunExecutableListener could be used
-         with the script based replication...
-         http://wiki.apache.org/solr/CollectionDistribution
-      -->
-    <!--
-       <listener event="postCommit" class="solr.RunExecutableListener">
-         <str name="exe">solr/bin/snapshooter</str>
-         <str name="dir">.</str>
-         <bool name="wait">true</bool>
-         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
-         <arr name="env"> <str>MYVAR=val1</str> </arr>
-       </listener>
-      -->
 
   </updateHandler>
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/solr-ref-guide/src/configsets-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/configsets-api.adoc b/solr/solr-ref-guide/src/configsets-api.adoc
index ee4f24c..ef67781 100644
--- a/solr/solr-ref-guide/src/configsets-api.adoc
+++ b/solr/solr-ref-guide/src/configsets-api.adoc
@@ -155,7 +155,6 @@ http://localhost:8983/solr/admin/configs?action=LIST
 
 Upload a ConfigSet, sent in as a zipped file. Please note that a ConfigSet is uploaded in a "trusted" mode if authentication is enabled and this upload operation is performed as an authenticated request. Without authentication, a ConfigSet is uploaded in an "untrusted" mode. Upon creation of a collection using an "untrusted" ConfigSet, the following functionality would not work:
 
- * RunExecutableListener does not initialize, if specified in the ConfigSet.
  * DataImportHandler's ScriptTransformer does not initialize, if specified in the ConfigSet.
  * XSLT transformer (tr parameter) cannot be used at request processing time.
  * StatelessScriptUpdateProcessor does not initialize, if specified in the ConfigSet.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1979b7ef/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc b/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc
index 1d0a5cf..082ccf9 100644
--- a/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc
@@ -91,22 +91,8 @@ With this configuration, when you call `commitWithin` as part of your update mes
 
 The UpdateHandler section is also where update-related event listeners can be configured. These can be triggered to occur after any commit (`event="postCommit"`) or only after optimize commands (`event="postOptimize"`).
 
-Users can write custom update event listener classes, but a common use case is to run external executables via the `RunExecutableListener`:
-
-`exe`::
-The name of the executable to run. It should include the path to the file, relative to Solr home.
-
-`dir`::
-The directory to use as the working directory. The default is the current directory (".").
-
-`wait`::
-Forces the calling thread to wait until the executable returns a response. The default is `true`.
-
-`args`::
-Any arguments to pass to the program. The default is none.
-
-`env`::
-Any environment variables to set. The default is none.
+Users can write custom update event listener classes in Solr plugins. As of Solr 7.1,
+`RunExecutableListener` was removed for security reasons.
 
 == Transaction Log