🤬
  • Fix RemoteVulnDetectors unintentionally going through PluginBootstrapModule configure.

    PiperOrigin-RevId: 461639793
    Change-Id: Ib0087fff9b5c9a41433784db808c9773f9a7b7fc
  • Loading...
  • John Y. Kim committed with Copybara-Service 2 years ago
    09bd2a8b
    1 parent a9dcf241
  • ■ ■ ■ ■ ■ ■
    plugin/src/main/java/com/google/tsunami/plugin/PluginLoadingModule.java
    skipped 57 lines
    58 58   ClassInfoList tsunamiPluginClasses =
    59 59   classScanResult
    60 60   .getClassesImplementing(TSUNAMI_PLUGIN_INTERFACE)
    61  - .filter(classInfo -> !classInfo.isInterface());
     61 + .filter(
     62 + classInfo ->
     63 + !classInfo.isInterface()
     64 + && !classInfo.implementsInterface(
     65 + "com.google.tsunami.plugin.RemoteVulnDetector"));
    62 66   for (ClassInfo tsunamiPluginClass : tsunamiPluginClasses) {
    63 67   logger.atInfo().log("Found plugin class: %s", tsunamiPluginClass.getName());
    64 68   // PluginInfo annotation is required for TsunamiPlugin.
    skipped 2 lines
    67 71   String.format(
    68 72   "Tsunami plugin '%s' must be annotated with PluginInfo",
    69 73   tsunamiPluginClass.getSimpleName()));
    70  - }
    71  - 
     74 + }
    72 75   install(newPluginBootstrapModule(tsunamiPluginClass));
    73 76   }
    74 77   }
    skipped 41 lines
Please wait...
Page is in error, reload to recover