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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:54:25+00:00 2026-05-25T22:54:25+00:00

In order to use some AJAX calls, we use often some input type=hidden. But

  • 0

In order to use some AJAX calls, we use often some input type=”hidden”. But these values can be easily changed. So, is it a builtin rails feature than permit to send date to AJAX, withouth being usable by user, or than can’t be changed by user ?

In my current rails apps, i’m using filters for discard all malicious actions on my controllers. I am not building a public API, so i don’t really need more powerful checks.

But for examples, i have an apotomo widget displaying some data, using some input hidden. But if you change it, you can access to another data set. In my case, it’s not really an issue, cause all these users have the right to access these data sets anyway.

But is it some manner to give datas to ajax call, in a secure way ? Or the only security, is about rights management ?

  • 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-25T22:54:26+00:00Added an answer on May 25, 2026 at 10:54 pm

    All input that comes from the user is insecure as you do not have control over it! Users even do not need a webbrowser but can use some other program (like curl or wget) to send manipulated data.

    As you state, using a whitelist (not a blacklist as you can never be sure of all bad, but of all good!) is a good way to start.

    To make sure the hidden fields have not been changed you can use some kind of checksum that is calculated on server side using a fixed secret. This secret must never be exposed to your visitors!

     hash = md5(field_1 + field_2 + field_3 + my_secret)
    

    When these four hidden fields (field_1..3, hash) arrive in your form you can recalculate the hash and compare it with the params[:hash] in order to be sure the field_1 to field_3 have not been changed.

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

Sidebar

Related Questions

Can some one specify the windows API, one need to use in order to
I can use the MS Word ActiveX control in order to access some parameters
I'm trying to use XSL-stylesheets in order to transform some generated XML-data to HTML-output.
I've read some topics regarding enabling google to crawl ajax based sites but the
In order to use normal mapping in GLSL shaders, you need to know the
I'm trying to use the DataAnnotationsModelBinder in order to use data annotations for server-side
I've found that in order to use PRISM's classes in XAML you need to
I'm attempting to capture the output of fputcsv() in order to use gzwrite() to
I am trying to find my java class URL in order to use it
I'm having trouble discovering exactly what I need to implement in order to use

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.