Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Bugsnag/Serializer.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
Expand All @@ -15,7 +16,7 @@ public static string SerializeObject(object obj)
public static string SerializeObject(object obj, string[] filters)
{
var parsedFilters = filters != null ?
filters.ToDictionary(m => m, m => true) :
filters.ToDictionary(m => m, m => true, StringComparer.OrdinalIgnoreCase) :
new Dictionary<string, bool>();

try
Expand Down
1 change: 1 addition & 0 deletions tests/Bugsnag.Tests/SerializerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public static IEnumerable<object[]> FilterTestData()
yield return new object[] { new FilterableTestObject { { "password", "password" } }, null, 0 };
yield return new object[] { new FilterableTestObject { { "username", "password" } }, new string[] { "password" }, 0 };
yield return new object[] { new FilterableTestObject { { "password", "password" }, { "credit_card_number", "number" } }, new string[] { "password", "credit_card_number" }, 2 };
yield return new object[] { new FilterableTestObject { { "Password", "password" }, { "Credit_Card_Number", "number" } }, new string[] { "password", "credit_card_number" }, 2 };
}
}
}