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

  • Home
  • SEARCH
  • 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 6049601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:35:42+00:00 2026-05-23T07:35:42+00:00

Here is an abstract example: 2 types of users ( user and admin )

  • 0

Here is an abstract example:
2 types of users (user and admin) have some data, that they can change on their’s Profile Page.

user can change only his own data, but admin can change data of any user.

On the Profile page of admin there is such a code:

$.ajax({
    type: "POST",
    url: "some.php",
    data: {
        'action' : 'data_change',
        'user_id': $("#user_id").val()
    },
    success: function(msg){
        alert( "Data Saved: " + msg );
    }
});

But on Profile page of user there is such a code:

$.ajax({
    type: "POST",
    url: "some.php",
    data: {
        'action' : 'my_data_change'
    },
    success: function(msg){
        alert( "Data Saved: " + msg );
    }
});

Here, for example my_data_change action (php function) gets user id from session.

Is it safe? For example some ‘bad user’ used to be an admin, but now is a user. So he may know how to send request (may be likes to watch in firebug).
It turns out, that with easy request modification any user can modify another user’s data.

But is it really to modify request locally from browser? In this example, is it really to change my_data_change action to data_change and add user_id parameter to request?

  • 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-23T07:35:43+00:00Added an answer on May 23, 2026 at 7:35 am

    They can modify all the requests they want, they still need to physically log into the server, or your some.php file can simply deny the request as unauthenticated (use sessions!). Once authenticated, the server knows whether the user is an admin or not, and can further check that the client has the proper permissions for the operation requested.

    The system is about as safe as you make it (give or take an unintended bug or two).

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

Sidebar

Related Questions

Here's the situation: I have an abstract class with a constructor that takes a
Here is an example of polymorphism from http://www.cplusplus.com/doc/tutorial/polymorphism.html (edited for readability): // abstract base
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Some ASP.NET controls only permit items of certain types, for example: <uc:MyControl runat=server....> <MyTableTemplate>
I have an abstract Handle<T> class that contains references an objects of type T.
I have an abstract class that other classes are inheriting this. public abstract class
The Setup I have a (rather standard) form that allows a user to create
I have a webservice with a method that takes a parameter of abstract base
What do people here use C++ Abstract Base Class constructors for in the field?

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.