Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3614682
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:16:48+00:00 2026-05-18T22:16:48+00:00

Project type: Asp MVC 2/NHibernate/C# Problem If you have an edit page in an

  • 0

Project type: Asp MVC 2/NHibernate/C#

Problem

If you have an edit page in an web application you will come to the problem that you have to send and then receive the id of the entity you’re editing, the IDs of sub-entities, entities that can be selected by dropdownmenus,…

As it is possible to modify a form-post, an evil user could try to send back another ID which maybe would grant him more rights (if i.e. that ID was related to a security entity).

My approach

  1. Create a GUID and associate it with the ID
  2. Save the association in the http session
  3. Wait for the response and extract the real ID out of the received GUID.

Question:

What techniques do you use to obfusicate an entity-ID?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:16:49+00:00Added an answer on May 18, 2026 at 10:16 pm

    If you’re doing that much for GUIDs, why not just use GUIDs for the identity of the entity itself that’s actually stored in the database (though I’d advise against it)?

    Or you could have a server side encryption scheme that encrypts and then subsequently decrypts the id (this is a long the same lines as what you’re doing except you’re not storing anything random like this in the session (yuck 🙂 ).

    You could even forget trying to do this at all since a lot of sites are “affected” by this issue, and it’s obviously not a problem (StackOverflow for example). The overhead is just too much.

    Also, if you’re worried about security, why don’t you have some sort of granular permissions set on the individual action/even entity level. This would solve some problems as well.

    EDIT:

    Another problem with your solution is inconsistent unique identifiers. If a user says “ID as23423he423fsda has ‘invalid’ data”, how do you know which ID it belongs to if it’s changing on every request (assuming you’re going to change the id in the URL as well)? You’d be much better of with an encryption algorithm that always hashes to the same value therefore, you can easily perform a lookup (if you need it) and also the user has consistent identifiers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I create a New Project of type ASP.Net MVC Web Application, I expect
Say I have an application with the following structure. // ASP.NET MVC (Web Project)
In my ASP.NET MVC project, I have a polymorphic collection that I wish to
I have an ASP.NET MVC project and I have a single action that accepts
I have an ASP.NET MVC project with a form. In the Action method that
I have an ASP.NET MVC 3 application and in my project I use ADO.NET
I'm developing an ASP.NET MVC application with NHibernate and I'm trying to use Automapper
I have a C# ASP.NET MVC project but my controllers are written in F#.
I'm working in an ASP.NET MVC project where I have created a two LinqToSQL
using VS 2008 i created a clean asp.net MVC application project and changed nothing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.