{"record":{"id":"25743c5edb1ea245","repo":"Devolutions/UniGetUI","slug":"custom-manager-paths-are-disabled-by-secure-settin","errorCode":null,"errorMessage":"Custom manager paths are disabled by secure settings.","messagePattern":"Custom manager paths are disabled by secure settings\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/UniGetUI.Interface.IpcApi/IpcManagerMaintenanceApi.cs","lineNumber":74,"sourceCode":"    public static async Task<IpcManagerMaintenanceActionResult> ReloadManagerAsync(\n        IpcManagerMaintenanceRequest request\n    )\n    {\n        ArgumentNullException.ThrowIfNull(request);\n        var manager = IpcManagerSettingsApi.ResolveManager(request.ManagerName);\n        await ReloadManagerAsync(manager);\n        return Success(\"reload-manager\", manager, \"reload\", \"completed\");\n    }\n\n    public static async Task<IpcManagerMaintenanceActionResult> SetExecutablePathAsync(\n        IpcManagerMaintenanceRequest request\n    )\n    {\n        ArgumentNullException.ThrowIfNull(request);\n        var manager = IpcManagerSettingsApi.ResolveManager(request.ManagerName);\n        if (!SecureSettings.Get(SecureSettings.K.AllowCustomManagerPaths))\n        {\n            throw new InvalidOperationException(\n                \"Custom manager paths are disabled by secure settings.\"\n            );\n        }\n\n        if (string.IsNullOrWhiteSpace(request.Path))\n        {\n            throw new InvalidOperationException(\"The path field is required.\");\n        }\n\n        Settings.SetDictionaryItem(Settings.K.ManagerPaths, manager.Name, request.Path);\n        await ReloadManagerAsync(manager);\n        return Success(\n            \"set-manager-executable\",\n            manager,\n            \"set-executable\",\n            \"completed\",\n            $\"Configured {manager.DisplayName} to use {request.Path}.\"\n        );","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/Devolutions/UniGetUI/blob/9b1d7d0eab91620fc15c86b36676532095936ae3/src/UniGetUI.Interface.IpcApi/IpcManagerMaintenanceApi.cs#L56-L92","documentation":"Thrown by IpcManagerMaintenanceApi.SetExecutablePathAsync when the SecureSettings flag AllowCustomManagerPaths is false. Setting a custom manager executable path is a privileged operation gated behind a secure (admin-controlled) setting, so the API refuses it outright when the flag is off, before even validating the path.","triggerScenarios":"POSTing to set-manager-executable while AllowCustomManagerPaths is disabled in SecureSettings. This is checked before the path-empty check, so even a well-formed request is rejected when the feature is locked off.","commonSituations":"A locked-down deployment where an administrator disabled custom manager paths for safety. Trying to override a manager path via IPC without first enabling the secure setting. Misunderstanding SecureSettings (admin-gated) vs Settings (user-gated).","solutions":["Enable SecureSettings.K.AllowCustomManagerPaths (requires the secure-settings approval flow, not a normal user setting).","If you cannot enable it, do not use set-manager-executable; rely on PATH-based manager discovery instead.","Confirm the setting is genuinely on via the secure-settings read API before calling."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"bool allowed = SecureSettings.Get(SecureSettings.K.AllowCustomManagerPaths);\nif (!allowed) { /* do not call set-manager-executable; surface to user */ }","typeGuard":null,"tryCatchPattern":"try { await client.SetExecutablePathAsync(req); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"disabled by secure settings\"))\n{ /* feature is locked off; guide user to enable via secure-settings approval flow */ }","preventionTips":["Check AllowCustomManagerPaths via the read API before exposing the set-executable UI.","Understand SecureSettings are admin-gated and cannot be toggled by a normal user setting."],"tags":["ipc","manager-maintenance","secure-settings","authorization","configuration"],"backgroundTag":null,"analyzedSha":"9b1d7d0eab91620fc15c86b36676532095936ae3","analyzedAt":"2026-08-13T12:19:18.278Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}