ソースを参照

fix #2851 Ensure only JAR files are recognized as plugins in the plugin directory.

Shinsuke Sugaya 9 ヶ月 前
コミット
160dd6ed81

+ 2 - 1
.gitignore

@@ -6,7 +6,8 @@
 /src/main/webapp/WEB-INF/classes/
 /src/main/webapp/WEB-INF/lib/
 /src/main/webapp/WEB-INF/site/
-/src/main/webapp/WEB-INF/plugin/
+/src/main/webapp/WEB-INF/plugin/*
+!/src/main/webapp/WEB-INF/plugin/.keep
 /src/main/webapp/WEB-INF/env/crawler/lib/
 /src/main/webapp/WEB-INF/env/suggest/lib/
 /src/main/webapp/WEB-INF/env/thumbnail/lib/

+ 1 - 1
src/main/java/org/codelibs/fess/helper/PluginHelper.java

@@ -232,7 +232,7 @@ public class PluginHelper {
                         return false;
                     }
                 }
-                return true;
+                return n.endsWith(".jar");
             });
             final List<Artifact> list = new ArrayList<>(jarFiles.length);
             for (final File file : jarFiles) {

+ 0 - 0
src/main/webapp/WEB-INF/plugin/.keep