diff --git a/Mindscape.Raygun4Net/Messages/RaygunRequestMessage.cs b/Mindscape.Raygun4Net/Messages/RaygunRequestMessage.cs index e652c4be..0474a24f 100644 --- a/Mindscape.Raygun4Net/Messages/RaygunRequestMessage.cs +++ b/Mindscape.Raygun4Net/Messages/RaygunRequestMessage.cs @@ -16,7 +16,7 @@ public RaygunRequestMessage(HttpRequest request, List ignoredFormNames) Url = request.Url.AbsolutePath; HttpMethod = request.RequestType; IPAddress = request.UserHostAddress; - Data = ToDictionary(request.ServerVariables, Enumerable.Empty()); + Data = ToDictionary(request.ServerVariables, ignoredFormNames ?? Enumerable.Empty()); QueryString = ToDictionary(request.QueryString, Enumerable.Empty()); Headers = ToDictionary(request.Headers, ignoredFormNames ?? Enumerable.Empty()); Form = ToDictionary(request.Form, ignoredFormNames ?? Enumerable.Empty(), true); diff --git a/README.md b/README.md index 83e9f4b5..5c03d21e 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,9 @@ If using the HTTP module then you can exclude errors by their HTTP status code b ``` -**Remove sensitive form data** +**Remove sensitive request data** -If you have sensitive user data being sent in a POST request that you wish to prevent being transmitted to Raygun, you can provide a list of possible keys (Names) to remove: +If you have sensitive data in an HTTP request that you wish to prevent being transmitted to Raygun, you can provide a list of possible keys (Names) to remove: ```csharp raygunClient.IgnoreFormDataNames(new List() { "SensitiveKey1", "SomeCreditCardData"}); @@ -90,6 +90,12 @@ raygunClient.IgnoreFormDataNames(new List() { "SensitiveKey1", "SomeCred When an error occurs and is passed in to Raygun4Net, if any of the keys specified are present in request.Form, they will not be transmitted to the Raygun API. +*Sensitive keys are removed from the following transmitted properties:* + + * HttpRequest.**Headers** + * HttpRequest.**Form** + * HttpRequest.**ServerVariables** + **Remove wrapper exceptions (available for all desktop .NET apps too)** If you have common outer exceptions that wrap a valuable inner exception which you'd prefer to group by, you can specify these by providing a list: @@ -226,7 +232,7 @@ This feature is optional if you wish to disable it for privacy concerns. * You can also set an arbitrary number of tags (as an array of strings), i.e. for tagging builds. This is optional and will be transmitted in addition to the version number above. -#### Custom data +## Custom data Providing additional name-value custom data is also available as an overload on Send(). diff --git a/readme.txt b/readme.txt index 1f9be471..97ee14b3 100644 --- a/readme.txt +++ b/readme.txt @@ -57,16 +57,20 @@ If using the HTTP module then you can exclude errors by their HTTP status code b -Remove sensitive form data - -If you have sensitive user data being sent in a POST request that you wish to prevent being transmitted to Raygun, you can provide a list of possible keys (Names) to remove: +Remove sensitive request data +If you have sensitive data in an HTTP request that you wish to prevent being transmitted to Raygun, you can provide a list of possible keys (Names) to remove: raygunClient.IgnoreFormDataNames(new List() { "SensitiveKey1", "SomeCreditCardData"}); - When an error occurs and is passed in to Raygun4Net, if any of the keys specified are present in request.Form, they will not be transmitted to the Raygun API. +Sensitive keys are removed from the following transmitted properties: + + * HttpRequest.Headers + * HttpRequest.Form + * HttpRequest.ServerVariables + Remove wrapper exceptions (available for all desktop .NET apps too) If you have common outer exceptions that wrap a valuable inner exception which you'd prefer to group by, you can specify these by providing a list: