Questions tagged [request-validation]

79 questions
2
votes
1 answer

What are the risks of allowing quote characters as part of a URL parameter?

I need to allow the user to submit queries as follows; /search/"my search string" but it's failing because of request validation, as outlined in the following 2 questions: How to include quote characters as a route parameter? Getting "Illegal…
DaveDev
  • 41,155
  • 72
  • 223
  • 385
2
votes
0 answers

Sitecore / ASP.NET Request Validation Won't Disable

Does anybody know why I am unable to turn request validation off. I currently have an ASP.NET MVC application that has been set up with Sitecore 8.1. I have created an action method on a controller that I am using to import some data into the…
2
votes
1 answer

Request validation turned off doesn't work on MVC pages

My web application contains both WebForm page and MVC Views. In my root web.config i have the following code And in my web.config for my Views folder i have this code
user2945722
  • 1,293
  • 1
  • 16
  • 35
2
votes
2 answers

Nancy and request validation

I have sample app in Nancy and have problem with request validation. I am using FluentValidator with BindAndValidate extension. So for example i have model : public class User { public string Name { get; set; } public int Age { get; set;…
Mennion
  • 2,873
  • 3
  • 20
  • 34
2
votes
1 answer

MVC 3 - A required anti-forgery token was not supplied or was invalid - Safari IOS

I have this form in asp MVC 3
<%=Html.AntiForgeryToken()%>
2
votes
1 answer

AngularJS can't find XSRF-TOKEN cookie

I'm using angular 1.0.4 with an ASP.NET MVC4 + Web API project. I'm trying to leverage angular's CSRF protection to no avail. I can see that I'm passing along a cookie named XSRF-TOKEN, but when angular tries to add the value as a header named…
panesofglass
  • 267
  • 3
  • 10
2
votes
2 answers

When users log out using CAS SSO, ASP.NET MVC triggers a HttpRequestValidationException

We're using the Jasig .NET CAS Client to interface with our organization's CAS SSO server. However, we've noticed that in ASP.NET MVC 3 (and I would assume this affects ASP.NET WebForms as well) applications, when users log out, we see the following…
Pandincus
  • 9,506
  • 9
  • 43
  • 61
1
vote
2 answers

Ktor-server RequestValidation not working

I am using ktor (2.1.0) to create a small API. While doing so, I am trying to leverage Ktor-server cool functionalities, including RequestValidation. That being said, it is not working and I can't figure out why since it looks to me very close to…
LeYAUable
  • 1,613
  • 2
  • 15
  • 30
1
vote
3 answers

Laravel update request validation not working on 9.x

I have create a validation request file on request folder. It working fine in new insert. But when i update, it's not working also i pass the unique $id but not working. a. Resource controller update method public function update(KlassNameRequest…
mahbub
  • 103
  • 1
  • 3
  • 13
1
vote
1 answer

HttpRequestValidationException is thrown despite having [AllowHtml] attribute

I have the following view model, which accepts a password change value. As such, it should accept special characters, including characters that trigger the HttpRequestValidationException - '<' and '>'. So I added the [AllowHtml] attribute on the…
Tsahi Asher
  • 1,767
  • 15
  • 28
1
vote
3 answers

Is anti forgery token added automatically, even without explicit [AutoValidateAntiforgeryToken]?

Context I've noticed that after creating a new ASP.NET Core Razor page application in VS 2019 from its out of the box template, even the purest html form with the purest model class renders output with
g.pickardou
  • 32,346
  • 36
  • 123
  • 268
1
vote
2 answers

AllowHtml, HttpRequestValidationException and ModelState

I have this viewmodel public class FooBarViewModel { public string Foo { get; set; } [AllowHtml] public string Bar { get; set; } } Instead of throwing a HttpRequestValidationException if .Foo is submitted with html in it, I want to add…
kenwarner
  • 28,650
  • 28
  • 130
  • 173
1
vote
1 answer

Laravel validate request filter field with dot (period) in field name

Here is to validate form request in laravel, request contains filter and field name in the filter has period(dot) present. Sample Request url ...?filter[entity.abc][]='value' Here entity.abc is actually a string, but laravel considers it to be array…
Sonia Behal
  • 63
  • 1
  • 1
  • 5
1
vote
1 answer

Change ASP.NET MVC request validation response

I like ASP.NET MVC 5's request validation feature. I want to keep it around. However it always causes Internal Error (500) responses to be returned to the client. That's not quite right; the real problem is that it's a bad request! I want to return…
Phil
  • 6,561
  • 4
  • 44
  • 69
1
vote
2 answers

Disabling ASP.NET Request Validation (for just one page) in a .NET 3.5 project hosted on IIS 7.5 with only .NET 4.0 installed

I'm having a problem with request validation in ASP.NET webforms that I am fairly sure is down to me hosting a .NET 3.5 project on IIS 7.5 (Windows 7 - local development machine). Essentially I'm receiving a postback from an external site (that is…
Kieran Benton
  • 8,739
  • 12
  • 53
  • 77