diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/CipherDetailsQuery.cs b/src/Infrastructure.EntityFramework/Repositories/Queries/CipherDetailsQuery.cs index 02d95bce9f5e..b9affcf94707 100644 --- a/src/Infrastructure.EntityFramework/Repositories/Queries/CipherDetailsQuery.cs +++ b/src/Infrastructure.EntityFramework/Repositories/Queries/CipherDetailsQuery.cs @@ -27,8 +27,8 @@ public virtual IQueryable Run(DatabaseContext dbContext) RevisionDate = c.RevisionDate, DeletedDate = c.DeletedDate, Reprompt = c.Reprompt, - Favorite = _userId.HasValue && c.Favorites != null && c.Favorites.Contains($"\"{_userId}\":true"), - FolderId = (_ignoreFolders || !_userId.HasValue || c.Folders == null || !c.Folders.Contains(_userId.Value.ToString())) ? + Favorite = _userId.HasValue && c.Favorites != null && c.Favorites.ToLowerInvariant().Contains($"\"{_userId}\":true"), + FolderId = (_ignoreFolders || !_userId.HasValue || c.Folders == null || !c.Folders.ToLowerInvariant().Contains(_userId.Value.ToString())) ? null : CoreHelpers.LoadClassFromJsonData>(c.Folders)[_userId.Value], }; diff --git a/src/Infrastructure.EntityFramework/Repositories/Queries/UserCipherDetailsQuery.cs b/src/Infrastructure.EntityFramework/Repositories/Queries/UserCipherDetailsQuery.cs index 91e43f90501d..dd0353304535 100644 --- a/src/Infrastructure.EntityFramework/Repositories/Queries/UserCipherDetailsQuery.cs +++ b/src/Infrastructure.EntityFramework/Repositories/Queries/UserCipherDetailsQuery.cs @@ -66,7 +66,7 @@ from cg in cg_g.DefaultIfEmpty() CreationDate = c.CreationDate, RevisionDate = c.RevisionDate, DeletedDate = c.DeletedDate, - Favorite = _userId.HasValue && c.Favorites != null && c.Favorites.Contains($"\"{_userId}\":true"), + Favorite = _userId.HasValue && c.Favorites != null && c.Favorites.ToLowerInvariant().Contains($"\"{_userId}\":true"), FolderId = GetFolderId(_userId, c), Edit = true, Reprompt = c.Reprompt,