How to store information "per browser tab" in ASP.NET MVC? -
in mvc application have 2 pages process. on first page gather information allow identify database record update. on second page gather new values used update record. in order work, need way persists information between 2 pages, including record id.
i though of 2 way , both have problem.
store information in session object.
this works long user not open second browser window or tab. if there risk he'll apply modifications wrong record. suppose opens tab 1 , complete first step. record id 1 stored in session object. user open tab 2 , complete first step. record id 2 stored in session object overwriting record id 1. user come first tab , complete second step thinking editing record 1, in fact editing record 2.
store information in hidden field on page.
this solve problem solution 1 has, trivial ill-intentioned user change record id overwrite record.
while typing question though of third solution. hybrid of theses two, i'm not sure it's safe. store random id in hidden field on page , use prefix key use access data in session object. think work. exploited solution 2 could?
any other way securely store data "per tab" instead of "per session"?
considering way 2 may check security server side. if user not have modification rights on specific record server must not save it. otherwise he/she modifying record has modifications rights on , not matter if he/she doing standard ui or hacking under it.
Comments
Post a Comment