Form Spoof/editing <option> tag values

R

Raterus

Hi there,

Should I be concerned with a malicious user spoofing a postback by changing the values for a control like the dropdownlist found in the rendered <option> tags. I would hope asp.net would bomb on them if the value they posted was never a listitem in the control.

Here's another question/situation though, what if the listitems in the codebehind were just "visible=false", could a user potentially trick a dropdownbox into acting like an element has been selected, that really was never there?

Thanks,
--Michael
 
N

Nicole Calinoiu

Raterus said:
Hi there,
Should I be concerned with a malicious user spoofing a postback by changing
the values for a control like the dropdownlist found in the rendered
<option> tags.

In general, yes.
I would hope asp.net would bomb on them if the value they
posted was never a listitem in the control.

It doesn't. There are several very good potential reasons for this,
including the little detail that the items collection might not yet be
populated at the time that the verification would execute.

You should add validation of your own if you want to avoid this problem.
When doing so, you should probably also consider that the list that was
generated for the client on initial page load is not necessarily the same
list that is available on the server by the time the page is submitted.
i.e.: Items could be added or removed from the source list in the time
between the loading and submission of the page by any given client.
Here's another question/situation though, what if the listitems in the
codebehind were just "visible=false", could a user potentially trick a
dropdownbox into acting like an element has been selected, that really was
never there?

It doesn't validate anyway, so visibility doesn't matter.

HTH,
Nicole
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top