473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Dangerous request???

I've beed trying to add the following MD5 hash to my webform as a hidden
field, but it comes up as a security error:

< input type="hidden" name="tester" value="Omoo/W0Yr6nBOGq9oNfvpw==" / >

Any ideas why? the '==' seems to be the issue.

John
Nov 19 '05 #1
6 2027
What is the exact error message? What is generating the error, client or
server?

"John" <js************@ecclesdeletethiscollege.ac.uk> wrote in message
news:uK*************@TK2MSFTNGP10.phx.gbl...
I've beed trying to add the following MD5 hash to my webform as a hidden
field, but it comes up as a security error:

< input type="hidden" name="tester" value="Omoo/W0Yr6nBOGq9oNfvpw==" / >

Any ideas why? the '==' seems to be the issue.

John

Nov 19 '05 #2
try setting validateRequest to false in machine.config

-- bruce (sqlwork.com)
"John" <js************@ecclesdeletethiscollege.ac.uk> wrote in message
news:uK*************@TK2MSFTNGP10.phx.gbl...
| I've beed trying to add the following MD5 hash to my webform as a hidden
| field, but it comes up as a security error:
|
| < input type="hidden" name="tester" value="Omoo/W0Yr6nBOGq9oNfvpw==" / >
|
| Any ideas why? the '==' seems to be the issue.
|
| John
|
|
Nov 19 '05 #3
Thanks Bruce (and Peter),

Yep it was a server side error, thrown by HttpRequest.ValidateInput I
guess.

I'm more interested in *why* the hidden field was considered
dangerous!! It was just an MD5 hash converted to base64.

Using Server.HtmlEncode made no difference.

As a work-around I did

s = s.Replace('/','-').Replace('=','.');

Was ValidateInput assuming '==' was javascript??? Seems like a bug if
so.

John

Nov 19 '05 #4

"John" <js************@ecclesdeletethiscollege.ac.uk> wrote in message
news:uK*************@TK2MSFTNGP10.phx.gbl...
I've beed trying to add the following MD5 hash to my webform as a hidden
field, but it comes up as a security error:

< input type="hidden" name="tester" value="Omoo/W0Yr6nBOGq9oNfvpw==" / >

Any ideas why? the '==' seems to be the issue.

John

This bit from SDK explains the security issue.

ValidateRequest
Indicates whether request validation should occur. If true, request
validation checks all input data against a hard-coded list of potentially
dangerous values. If a match occurs, an HttpRequestValidationException Class
is thrown. The default is true.
This feature is enabled in the machine configuration file (Machine.config).
You can disable it in your application configuration file (Web.config) or on
the page by setting this attribute to false.

Note This functionality helps reduce the risk of cross-site scripting
attacks for straightforward pages and ASP.NET applications. An application
that does not properly validate user input can suffer from many types of
malformed input attacks, including cross-site scripting and SQL Server
injection attacks. There is no substitute for carefully evaluating all forms
of input in an application and making sure that they are either properly
validated or encoded, or that the application is escaped prior to
manipulating data or sending information back to the client. For more
information about cross-site scripting, see
http://www.cert.org/advisories/CA-2000-02.html.
Nov 19 '05 #5
The server does not know that something is hidden or not. Also, just
because a field is hidden in HTML, does not mean that someone could not
create a clone of the page where they could spoof the field value. The
server just protects against any form fields because the server has no way
of knowing where the data came from.
<jo********@yahoo.co.uk> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
Thanks Bruce (and Peter),

Yep it was a server side error, thrown by HttpRequest.ValidateInput I
guess.

I'm more interested in *why* the hidden field was considered
dangerous!! It was just an MD5 hash converted to base64.

Using Server.HtmlEncode made no difference.

As a work-around I did

s = s.Replace('/','-').Replace('=','.');

Was ValidateInput assuming '==' was javascript??? Seems like a bug if
so.

John

Nov 19 '05 #6
Ok, but shouldn't HtmlEncode() fix this??

I would expect any potentially dangerous content, when htmlencoded, to be
rendered harmless.

John

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:e%****************@TK2MSFTNGP15.phx.gbl...
The server does not know that something is hidden or not. Also, just
because a field is hidden in HTML, does not mean that someone could not
create a clone of the page where they could spoof the field value. The
server just protects against any form fields because the server has no way
of knowing where the data came from.

Using Server.HtmlEncode made no difference.

As a work-around I did

s = s.Replace('/','-').Replace('=','.');

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anil Kripalani | last post by:
When a user of our ASP.NET 1.1 application submits a form with the phrase 'manuscript:' in a text field, ASP returns the error 'A potentially dangerous Request.Form value was detected from the...
1
by: John Morgan | last post by:
I am attempting to use a try/catch block to trap a querystring which is caught by ValidateRequest="true" in the @page directive A simple example of the blockthat does not work is Try...
1
by: angus | last post by:
Dear All, how to try-catch "A potentially dangerous Request.Form value was detected from the client (txtUserName="<asdf")." this exception? i've set the debugger in the Page_InIt function,...
6
by: STech | last post by:
If data you post back contains the following string on<<any sequence of characters>>= example: on2q3asdf= The page will throw the following exception: A potentially dangerous Request.Form...
302
by: Lee | last post by:
Hi Whenever I use the gets() function, the gnu c compiler gives a warning that it is dangerous to use gets(). Is this due to the possibility of array overflow? Is it correct that the program...
1
by: Sergey Zuyev | last post by:
Hello all I have simple edit form. When user saves data that contains restricted characters such as (< , etc.) , regular expression validator will display a warning message. It all works fine,...
2
by: arun | last post by:
Hi I want to store the text from a TextBox that contains <br, *, $ etc.to sql server. But it shows me an error message "A potentially dangerous Request.Form value was detected from the client...
2
by: Steve Richter | last post by:
getting this "potentially dangerous Request.Form value was detected" exception with a textbox which I have populated with some source code. I think I am getting the exception when I click OK on...
233
by: Julian | last post by:
'evening. I'm not new to C and have been programming in it since I was 8 but here's a strange problem I've never seen before. When I compile a program from our C course with a windows compiler...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.