[WIP] Fix ui api authentication

This commit is contained in:
Vladimir Stoilov
2024-09-25 17:34:23 +03:00
parent 1b6ee722f3
commit 08830f29c6
7 changed files with 27 additions and 19 deletions

View File

@@ -132,8 +132,7 @@ func authenticateAPIRequest(ctx context.Context, pktInfo *packet.Info) (retry bo
var originalPid int
// Get authenticated path.
// FIXME(vladimir): provide a better check for detecting filepath. Note there is exception on linux with portmaster ui.
authenticatedPath := "" // updates.RootPath()
authenticatedPath := module.instance.BinaryUpdates().GetRootPath()
if authenticatedPath == "" {
return false, fmt.Errorf(deniedMsgMisconfigured, api.ErrAPIAccessDeniedMessage) //nolint:stylecheck // message for user
}