From e1a43a5fc3ded2e56270fe7064683921505e9498 Mon Sep 17 00:00:00 2001 From: ahall Date: Mon, 6 Jul 2026 08:39:02 +0100 Subject: [PATCH] docs: document secure UnsafeEntityLogging default in todoapp-mvc sample (#480) - Bump CommunityToolkit.Datasync.Server(.EntityFrameworkCore) to 10.1.0 so the sample builds against the release that introduced UnsafeEntityLogging (#446). - Explicitly set UnsafeEntityLogging = false in TodoItemsController with a comment explaining the sample keeps entity logging disabled to avoid writing TodoItem contents to logs. --- .../TodoApp.Service/Controllers/TodoItemsController.cs | 5 +++++ samples/todoapp-mvc/TodoApp.Service/TodoApp.Service.csproj | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/samples/todoapp-mvc/TodoApp.Service/Controllers/TodoItemsController.cs b/samples/todoapp-mvc/TodoApp.Service/Controllers/TodoItemsController.cs index 2a97aa44..225d6d3c 100644 --- a/samples/todoapp-mvc/TodoApp.Service/Controllers/TodoItemsController.cs +++ b/samples/todoapp-mvc/TodoApp.Service/Controllers/TodoItemsController.cs @@ -11,5 +11,10 @@ public class TodoItemsController : TableController public TodoItemsController(TodoContext context) : base() { Repository = new EntityTableRepository(context); + + // UnsafeEntityLogging is intentionally left at its secure default (false). + // This sample stores user-supplied TodoItem content, so only the entity ID + // is logged; the full serialized entity is never written to the logs. + Options = new TableControllerOptions { UnsafeEntityLogging = false }; } } diff --git a/samples/todoapp-mvc/TodoApp.Service/TodoApp.Service.csproj b/samples/todoapp-mvc/TodoApp.Service/TodoApp.Service.csproj index 16bc2b5d..7a88cdea 100644 --- a/samples/todoapp-mvc/TodoApp.Service/TodoApp.Service.csproj +++ b/samples/todoapp-mvc/TodoApp.Service/TodoApp.Service.csproj @@ -7,8 +7,8 @@ - - + +