CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 2/16/2006 2:36:15 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 16 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
Joannes Vermore
Asp.Net User
How to pass arguments between pages in a safe way?2/16/2006 2:36:15 PM

0/0

Let's consider that I have two ASP pages: A and B. I would like to redirect a user from the page A to the page B and passes several arguments from A to B.

I do not want the user to get access to the arguments.
I do not want the user be able to alter the arguments.


Ok, the solution that I was using was
- on page A, store the arguments in the session state + perform a Response.Redirect to page B.
- on page B, consume the arguments from page A (consume = read & remove).

Actually, this method is not safe. Indeed, It is be possible for the user to load its session state from the page A without accepting the redirection to the page B (that should consume the arguments). The user can now perform several operations that change the context in a way that makes the session state (still containing arguments for the page B) totally illegal. Then the user load the page B --> website cracked.

Does anyone has a simple scheme to pass arguments between pages in a safe way?

Thanks in advance,
Joannes
XIII
Asp.Net User
Re: How to pass arguments between pages in a safe way?2/16/2006 2:46:40 PM

0/0

Hi,

you might want to take a look at the possibilities: ASP.NET: Nine Options for Managing Persistent User State in Your ASP.NET Application -- MSDN Magazine, April 2003

Grz, Kris.


Kris van der Mast [MVP] || 101 LINQ to SQL samples
BoulderBum
Asp.Net User
Re: How to pass arguments between pages in a safe way?2/16/2006 5:38:55 PM

0/0

Well, the scenario you describe is actually a perfectly acceptable one. There's no way for anyone to change session state unless you explicitly let them, say through input or something, thus any security problem is in how you'd accept the information rather than how you chose to store and use it. For instance, if the Session info is based on say, TextBox input, the question would be: who cares if they give different input before the transfer? And if it's based on some calculation or the result of some processing, the question is: why are you giving the client access to such things?

That said, there are a few ways to address your concerns, the first of which would be to use Server.Transfer instead of Response.Redirect so it doesn't matter if they try to block the transfer on the client because it would happen on the server. If you do that, however, you'll want to use Context instead of Session to store the information so you still keep it on the server, but don't have to worry about cleanup (Context info is dumped after each request).

You also have the option of blocking changes to the Session if a value is already present, perhaps accessing the Session object by proxy through a SessionManager object that handles duplicate checks in a consistant way and knows when to clean itself (say by exposing a Get(string name, bool removeAfterGet) function that takes a bool indicating whether or not to remove the objects from session).

Yet another alternative would be to store a hash of the content in your storage mechanism (similar to what ASP.NET does with the Forms Authentication Cookie) so that you can see if the information has been tampered with, but you'd need to make sure you don't let your code just recalculate a new hash when new information comes in.

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning Linux Programming Authors: Neil Matthew, Richard Stones, Pages: 780, Published: 2007
Linux Device Drivers Authors: Alessandro Rubini, Jonathan Corbet, Pages: 564, Published: 2001
Visual Basic .NET Power Tools: Power Tools Authors: Evangelos Petroutsos, Richard Mansfield, Pages: 694, Published: 2003
Sams Teach Yourself Visual Studio .NET 2003 in 21 Days Authors: Stephen Walther, Jason Beres, Pages: 696, Published: 2003
The First Woman in the Republic: A Cultural Biography of Lydia Maria Child Authors: Carolyn L. Karcher, Pages: 804, Published: 1998
Videotex International: Proceedings of the Conference Held in Amsterdam, October 1985 Authors: Blenheim Online, Pages: 404, Published: 1985

Web:
How to pass arguments between pages in a safe way? - ASP.NET Forums Re: How to pass arguments between pages in a safe way? ... Re: How to pass arguments between pages in a safe way? ...
How to pass arguments to addEventListener listener function ... How to pass arguments to addEventListener listener function? ... Safe, universal , way to use addEventHandler in Javascript? ...
Blocks - an alternative for Closures ? « brain driven development Feb 10, 2008 ... Still it allows to ‘pass’ arguments if we are in need of. ..... If you want to forgo a type safe way of using arguments of potentially ...
Acquisitions, Competition, Market Power and Regulation - 131003 Morrisons' bid to buy 480 Safeway stores will make it a major competitor for the ... Oligopoly refers to competition between the few and occurs where a few ...
optional function arguments Is there a way to have an optional argument keep there default value? .... Global:Newer: safe mode off Older: passing data between pages ...
Safe, Simple Multithreading in Windows Forms, Part 3 Web services are like passing messages between threads except that the messages ... calculated digits of pi using some way-cool, fast pi calculation engine: ...
WWW Security FAQ: CGI Scripts Is it doing this in a safe way? Does it run with suid (set-user-id) privileges? ..... C programmers can use the exec family of commands to pass arguments ...
perl.beginners: Re: Using $_ in a function if no argument is passed This is commonly called 'pass by > reference' and is a nice, safe way to do things. If you want to operate > on the passed arguments themselves ('pass by ...
"Some convincing arguments to pass back to nervous customers": the ... "Some convincing arguments to pass back to nervous customers": the role of the tobacco retailer in the Australian tobacco industry’s smoker reassurance ...
Writing secure code | drupal.org l() - Escapes text and attributes unless you pass TRUE for the $html parameter. .... Create Forms in a Safe Way to Avoid Cross-site Request Forgeries (CSRF) ...

Videos:
Core Patterns for Web Permissions Google TechTalks July 19, 2006 Tyler Close Visiting Scientist Hewlett-Packard Laboratories Mr. Close is a researcher and developer, working in the...
The Paradox of Choice - Why More Is Less Google TechTalks April 27, 2006 Barry Schwartz
www.moldytoaster.com l in relating to me the whole of your history, as it will prevent my forming any erroneous opinions concerning you in future. As for that Benedetto, ...
Hidabroot אסטרולגיה Astrologia astrology עוד לפני אלפי שנים עסקו אנשי העולם העתיק בחקר Astrologia מידע הטמון בקרבי השמים אודות גורלו של האדם ואופיו. האיצטגנינות או בשמה המודרני אסטרולוגיה ה...
Santa Monica Council Meeting Santa Monica Council Meeting




Search This Site:










cs0234: the type or namespace name 'oledb' does not exist in the class

response redirect

styles

problem in adding controls dynamically to toolbox

converting string to an integer

disabling user account

sso across completely different domains

query!

adobe download: what a pain..

redirect to pdf-file

masterpage and images problem

manager users error

problems with the .dll

hardcoding the key

wait time in online game??

looking for advanced search module

asp.net 2005 web set up

prevent duplicate form posting

asp.net 2.0 menu control tutorials/documentation?

re-occuring problem building up in 2.1.2 install.

does csk offer multi-lingual support?

page does not refresh on login/logout

getting error: dropdownlist' cannot be converted to 'string' how should i format this?

still having godaddy installation problems

site error when i tranfered the site from xp to vista

help turning skin object to module

asp.net 2.0 link directory script?

question abou code (vwd)

radio button validate

how to deploy my applications

 
All Times Are GMT