From 36d44a30aa66b6269b4e604a9c8e536fb8220604 Mon Sep 17 00:00:00 2001 From: Guilherme Branco Stracini Date: Tue, 23 Jun 2026 13:45:34 +0100 Subject: [PATCH 1/5] chore: update package versions for maintenance Update various package versions in Directory.Packages.props to their latest releases. Includes upgrading Microsoft.EntityFrameworkCore, Microsoft.Extensions, and others to version 10.0.9 to address bug fixes and improvements. Also update Scalar.AspNetCore, MimeKit, HtmlAgilityPack, Polly, and Microsoft.NET.Test.Sdk for enhanced stability and performance. These changes ensure the project leverages the latest features and security updates provided by the packages. --- Directory.Packages.props | 54 ++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index f7c2172..35b6a93 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,38 +5,26 @@ - - - + + + - + - - - - - - - - + + + + + + + + - - - + + + @@ -52,23 +40,23 @@ - + - + - + - + - + - + \ No newline at end of file From 59a0c61f43ea34e47671682a34fade44c46f9667 Mon Sep 17 00:00:00 2001 From: Guilherme Branco Stracini Date: Tue, 23 Jun 2026 13:56:56 +0100 Subject: [PATCH 2/5] chore: update package version for DependencyInjection Upgrade `Microsoft.Extensions.DependencyInjection` from version 10.0.8 to 10.0.9 for consistency with other Microsoft packages. This ensures all related packages are aligned to the same version, potentially reducing compatibility issues. --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 35b6a93..b4a174a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -21,7 +21,7 @@ - + @@ -59,4 +59,4 @@ - \ No newline at end of file + From 85f57fb3ade8afd27656fc0f7c8df1efa588d6d5 Mon Sep 17 00:00:00 2001 From: Guilherme Branco Stracini Date: Tue, 23 Jun 2026 14:04:11 +0100 Subject: [PATCH 3/5] chore: update EFCore.InMemory package to version 10.0.9 Update Microsoft.EntityFrameworkCore.InMemory package version from 10.0.0 to 10.0.9. This change ensures consistency with other EntityFrameworkCore packages already using version 10.0.9, improving reliability and enabling access to bug fixes and new features introduced in the latest version. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index b4a174a..8fc168a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -8,7 +8,7 @@ - + From 8ff8af2e1f935cc3e0d7d87b69d04ccbe2fe602d Mon Sep 17 00:00:00 2001 From: Guilherme Branco Stracini Date: Tue, 23 Jun 2026 14:31:55 +0100 Subject: [PATCH 4/5] fix: suppress CVE-2025-6965 advisory temporarily Add a suppression for SQLitePCLRaw.lib.e_sqlite3 2.1.11 due to CVE-2025-6965 (GHSA-2m69-gcr7-jv3q), which currently lacks a patched NuGet version. This is a transitive dependency of Microsoft.EntityFrameworkCore.Sqlite. The suppression allows us to proceed until an upstream fix is available. --- Directory.Packages.props | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8fc168a..cb360e6 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,6 +3,11 @@ true true + + + + From d1f9e2761147b6af4c6ccbb94214b049efa44d21 Mon Sep 17 00:00:00 2001 From: Guilherme Branco Stracini Date: Tue, 23 Jun 2026 14:36:19 +0100 Subject: [PATCH 5/5] refactor: improve code readability and consistency Refactor whitespace and formatting across several files to enhance consistency and readability. - Reformatted package version entries in Directory.Packages.props to have each attribute on a separate line, aligning with practice seen in other entries, improving readability. - Replaced null strings with empty strings in several GetAttributeValue method calls in DaftEmailParser.cs, ensuring consistent handling of default values for attribute extraction. - Reorganized multiline initialization in PropertiesEndpointTests.cs to improve readability by aligning parameter values and maintaining consistency with the rest of the codebase. These changes improve overall code clarity, making maintenance and future edits easier and more reliable without altering functionality. --- Directory.Packages.props | 20 +++++++++++++---- .../Parsing/DaftEmailParser.cs | 8 +++---- .../Endpoints/PropertiesEndpointTests.cs | 22 +++++++++++++++++-- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index cb360e6..18f6424 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -23,13 +23,25 @@ - - - + + + - + diff --git a/src/DaftAlerts.Infrastructure/Parsing/DaftEmailParser.cs b/src/DaftAlerts.Infrastructure/Parsing/DaftEmailParser.cs index 4b68df4..d844a42 100644 --- a/src/DaftAlerts.Infrastructure/Parsing/DaftEmailParser.cs +++ b/src/DaftAlerts.Infrastructure/Parsing/DaftEmailParser.cs @@ -128,8 +128,8 @@ private static (string? DaftUrl, string? DaftId) ExtractListingUrlAndId(HtmlDocu { var candidates = new[] { - a.GetAttributeValue("originalsrc", null), - a.GetAttributeValue("href", null), + a.GetAttributeValue("originalsrc", ""), + a.GetAttributeValue("href", ""), }; foreach (var raw in candidates) @@ -268,7 +268,7 @@ private static int ExtractFirstInt(string text, Regex regex) { foreach (var img in doc.DocumentNode.SelectNodes("//img") ?? Enumerable.Empty()) { - var src = img.GetAttributeValue("src", null); + var src = img.GetAttributeValue("src", ""); if (string.IsNullOrWhiteSpace(src)) continue; var m = BerRegex().Match(src); @@ -285,7 +285,7 @@ private static int ExtractFirstInt(string text, Regex regex) { foreach (var img in doc.DocumentNode.SelectNodes("//img") ?? Enumerable.Empty()) { - var src = img.GetAttributeValue("src", null); + var src = img.GetAttributeValue("src", ""); if (string.IsNullOrWhiteSpace(src)) continue; if (src.Contains("media.daft.ie", StringComparison.OrdinalIgnoreCase)) diff --git a/tests/DaftAlerts.Api.Tests/Endpoints/PropertiesEndpointTests.cs b/tests/DaftAlerts.Api.Tests/Endpoints/PropertiesEndpointTests.cs index 9c73431..47d52c2 100644 --- a/tests/DaftAlerts.Api.Tests/Endpoints/PropertiesEndpointTests.cs +++ b/tests/DaftAlerts.Api.Tests/Endpoints/PropertiesEndpointTests.cs @@ -212,8 +212,26 @@ public async Task Bulk_recycle_updates_count() using var db = _factory.CreateDbContext(); var toRecycle = new[] { - NewProperty("bulk-1", "D09", PropertyStatus.Inbox, 1000, 1, null, "Apartment", DateTime.UtcNow.AddDays(-10)), - NewProperty("bulk-2", "D09", PropertyStatus.Inbox, 1000, 1, null, "Apartment", DateTime.UtcNow.AddDays(-11)), + NewProperty( + "bulk-1", + "D09", + PropertyStatus.Inbox, + 1000, + 1, + null, + "Apartment", + DateTime.UtcNow.AddDays(-10) + ), + NewProperty( + "bulk-2", + "D09", + PropertyStatus.Inbox, + 1000, + 1, + null, + "Apartment", + DateTime.UtcNow.AddDays(-11) + ), }; db.Properties.AddRange(toRecycle); db.SaveChanges();