Skip to content

Commit c2a3f0c

Browse files
author
mwatson
committed
Collect headers on exceptions by default but ignoring 2 sensitive ones
1 parent 05c8517 commit c2a3f0c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Src/StackifyLib/Config.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ public static void LoadSettings()
2525
CaptureSessionVariables = Get("Stackify.CaptureSessionVariables", "")
2626
.Equals("true", StringComparison.CurrentCultureIgnoreCase);
2727

28-
CaptureErrorHeaders = Get("Stackify.CaptureErrorHeaders", "")
29-
.Equals("true", StringComparison.CurrentCultureIgnoreCase);
28+
CaptureErrorHeaders = Get("Stackify.CaptureErrorHeaders", "true").Equals("true", StringComparison.CurrentCultureIgnoreCase);
3029

3130
CaptureErrorCookies = Get("Stackify.CaptureErrorCookies", "")
3231
.Equals("true", StringComparison.CurrentCultureIgnoreCase);

Src/StackifyLib/Models/WebRequestDetail.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ private void Load(HttpContext context)
168168
Config.ErrorHeaderBadKeys.Add("cookie");
169169
}
170170

171+
if (!Config.ErrorHeaderBadKeys.Contains("authorization"))
172+
{
173+
Config.ErrorHeaderBadKeys.Add("authorization");
174+
}
175+
171176
Headers = ToKeyValues(request.Headers, Config.ErrorHeaderGoodKeys, Config.ErrorHeaderBadKeys);
172177
}
173178

Src/StackifyLib/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.24.4",
2+
"version": "1.25.0",
33

44
"title": "Stackify API",
55

0 commit comments

Comments
 (0)