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 9120369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:36:45+00:00 2026-06-17T05:36:45+00:00

In the web application, of course in many case we will support CRUD(Create, Retriever,

  • 0

In the web application, of course in many case we will support CRUD(Create, Retriever, Update, Delete)

Basic programmer will do something like bellow(without Verification ) :

delete?room_id=12
update?room_id=13

The displayed room_id is only for room that belong to the user/client.
first Authentication is only using user and password. well that’s a standard.

But i believe we should not trust the user. The bad user may guess the room_id that’s not belong him. like delete?room_id=199

I ask my programmer friend, and they even never think about this issue.

So to prevent that, i have a basic solution that to always pass the user_id for any related object. such querying before any action is the room_id belong to the user.
If this the only solution, so i must to modify all of the query i already write.

The question is, is there any good or better solution for this basic problem ?

Thanks

  • 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-06-17T05:36:47+00:00Added an answer on June 17, 2026 at 5:36 am

    Your approach is a good one. And it really doesn’t surprise me that your programmer friends haven’t thought about it; unfortunately security seems to be the last thing on most programmers minds.

    In a good system, you will perform an authorization check on nearly every action performed to see if this particular user is authorized to perform that action. Its generally good practice to build this check in throughout your app, even for things that you don’t normally care if they are authorized for or not: someday you might be.

    In your scenario, that action might be to retrieve the room, update the room or even delete the room.

    To help things along I have a few recommendations:

    1. Make the room_id non guessable if possible. The easy way, presuming you are already using an int as your primary key, is to encrypt / decrypt it when passing between the client browser and your application.

    2. Make sure that on the browser side you aren’t passing in the users id but rather pulling that from session or through some other mechanism. The point is you don’t want to trust the user to pass the id to you.

    3. Any action that is not a GET, use an HTTP POST to perform. In other words you shouldn’t be putting the ids in the query string at all but rather as post data.

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

Sidebar

Related Questions

my web application supposed to send email reminders in some point it will send
I have to create a small who does what web application for incoming letter
I'm taking Web Application Engineering course on Udacity. I noticed that the instructor use
DTO I'm building a Web application I would like to scale to many users.
If web application and SQL Server are on different machines(both running Windows) on intranet,
My web application is written using jsp/javascripts. Backend Java. Have managed to implement the
My web application as a topbar where i need to display the number of
My web application uses a lot of <a href=#>Perform client script action</a> anchor links
My web application is ASP.NET MVC4 with Razor and Knockout.js. The view model hierarchy
The web application I'm working on serves up images with URLs like /image?name=a.gif. Pages

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.