You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MultipartFormDataContent form = new MultipartFormDataContent();
var message = new HttpRequestMessage();
var content = new MultipartFormDataContent();
content.Add(new StringContent("11111"), "AccountID");
content.Add(new StringContent("22222"), "MessageID");
content.Add(new StringContent("some message"), "MessageBody");
message.Method = HttpMethod.Post;
message.Content = content;
message.RequestUri = new Uri(apiEndpoint);
string token = await bt.GetCachedTokenAsync(cache);
message.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
return await httpClient.SendAsync(message);
Azure Application Gateway will block the upload with rule 920140 because the message fails strict validation.
Expected result
The multipart/form-data upload by HttpClient should pass strict validation by WAF rule 920140.
The text was updated successfully, but these errors were encountered:
shawnz88
changed the title
Multipart/form-data upload from HttpClient blocked by Azure Application Gateway WAF rule 920130 REQUEST-920-PROTOCOL-ENFORCEMENT
Multipart/form-data upload from HttpClient blocked by Azure Application Gateway WAF rule 920140 REQUEST-920-PROTOCOL-ENFORCEMENT
Feb 16, 2023
How to reproduce:
MultipartFormDataContent form = new MultipartFormDataContent();
var message = new HttpRequestMessage();
var content = new MultipartFormDataContent();
content.Add(new StringContent("11111"), "AccountID");
content.Add(new StringContent("22222"), "MessageID");
content.Add(new StringContent("some message"), "MessageBody");
message.Method = HttpMethod.Post;
message.Content = content;
message.RequestUri = new Uri(apiEndpoint);
string token = await bt.GetCachedTokenAsync(cache);
message.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
return await httpClient.SendAsync(message);
Azure Application Gateway will block the upload with rule 920140 because the message fails strict validation.
Expected result
The multipart/form-data upload by HttpClient should pass strict validation by WAF rule 920140.
The text was updated successfully, but these errors were encountered: