This commit is contained in:
手瓜一十雪 committed 2026-06-20 12:41:32 +08:00
1 parent 091c012427
commit bce27c50bb
1 file changed
+4 -4
@@ -242,14 +242,14 @@ export class PluginLoader {
* @returns 拒绝原因;通过校验返回 null * @returns 拒绝原因;通过校验返回 null
*/ */
private getRejectReason (pluginId: string, pluginDir: string): string | null { private getRejectReason (pluginId: string, pluginDir: string): string | null {
if (!this.isOfficialPlugin(pluginId)) {
return 'non-official plugin (not in whitelist)';
}
const hit = this.scanSensitiveWords(pluginDir); const hit = this.scanSensitiveWords(pluginDir);
if (this.isOfficialPlugin(pluginId)) {
return null;
}
if (hit) { if (hit) {
return `sensitive keyword "${hit}"`; return `sensitive keyword "${hit}"`;
} }
return null; return "not in official plugin whitelist";
} }
/** /**