Added rejection of imported plugins claiming to be config server managed

This commit is contained in:
Thorsten Sommer 2026-08-05 19:57:19 +02:00
parent 111465b25e
commit c5103485c4
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -195,6 +195,12 @@ public sealed class AssistantPluginInstallService
if (!validation.Success || validation.AssistantPlugin is null)
return Error(validation.Issue);
// A plugin the user imports by hand never comes from a config server. We reject such
// archives because AI Studio trusts this self-declared flag: an imported plugin
// claiming it would be neither replaceable nor deletable through the user interface:
if (validation.AssistantPlugin.IsManagedByConfigServer)
return Error(TB("This plugin archive declares itself as managed by a config server. Only the IT department of your organization might deploy such plugins."));
return await this.InstallStagedAssistantAsync(assistantPluginsRoot, validation with { StagingDirectory = pluginDirectory }, token);
}
catch (Exception e) when (e is not OperationCanceledException)