From 1802e1281135cba83eb4acd86b58293fe121e2a5 Mon Sep 17 00:00:00 2001 From: Graham Steffaniak <42989099+gtsteffaniak@users.noreply.github.com> Date: Thu, 14 May 2026 10:47:26 -0500 Subject: [PATCH] updated to fix critical bug (#2424) (#2427) Co-authored-by: Kevin B. Co-authored-by: Stephan Paternotte Co-authored-by: Nebula <40148908+nebula-it@users.noreply.github.com> Co-authored-by: Juan Soler --- CHANGELOG.md | 5 +++++ backend/common/settings/settings.go | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cc57b11df..842d966aa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. For commit guidelines, please refer to [Standard Version](https://github.com/conventional-changelog/standard-version). +## v1.4.1 + + **Security**: + - Fix critical: unauthenticated user can view source info + ## v1.4.0 **New Features**: diff --git a/backend/common/settings/settings.go b/backend/common/settings/settings.go index 6a90ac58ce..e8ed9b3f16 100644 --- a/backend/common/settings/settings.go +++ b/backend/common/settings/settings.go @@ -133,6 +133,10 @@ func ApplyUserDefaults(u *users.User) { // FileLoading settings u.FileLoading = d.FileLoading + if u.Username == "anonymous" { + return + } + // Permissions u.Permissions.Api = d.Account.Permissions.Api u.Permissions.Admin = d.Account.Permissions.Admin @@ -147,7 +151,7 @@ func ApplyUserDefaults(u *users.User) { u.LoginMethod = users.LoginMethod(d.Account.LoginMethod) } - if len(u.Scopes) == 0 && u.Username != "anonymous" { + if len(u.Scopes) == 0 { for _, source := range Config.Server.Sources { if source.Config.DefaultEnabled { u.Scopes = append(u.Scopes, users.SourceScope{