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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:53:35+00:00 2026-06-12T14:53:35+00:00

I use tools like Firebug pretty routinely, and often build SPA style dynamic forms

  • 0

I use tools like Firebug pretty routinely, and often build SPA style dynamic forms where DOM manipulation with user inputs is routine. Are there any safeguards against a user inserting options into a select box using a tool like Firebug or any sort of javascript CLI?

As a simple example, consider this select box for you to choose whether you are married or unmarried (My actual select boxes have MANY more options, and are populated via AJAX from XML files. This will be important later.):

<select name="mstatus" id="mstatus">
    <option value="" selected>Specify marital status</option>
    <option value="Married">Married</option>
    <option value="Single">Single</option>
</select>

Currently I can easily insert another option thusly (I have Mootools on the page):

$('mstatus').innerHTML+="<option value='Rebel'>I won't play by the rules</option>"

Now of course for this example, I can check server side whether the selected option is valid without too much grief. But generally I would have to compare the user submission to the original XML source for each select in order to confirm its validity.

Is there another way to ensure the integrity of returned values? Is this enough of a non issue for me to take user selection at face value? Is the best practice here really just to treat all select inputs as text inputs until you have confirmed they are selected from within their valid range of values?

Note: There is no danger of code injection, since all values entered are thoroughly vetted and are pretty inert by the time they get popped into the database.

  • 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-12T14:53:36+00:00Added an answer on June 12, 2026 at 2:53 pm

    No. The user has full control over the page, and therefore you should never trust what comes from there. Always perform complete a thorough validation on your server, and reject anything that doesn’t add up.

    As far as the validation goes, you could just fetch the XML once and reference it repeatedly to check for validity, but aside from that there’s not really that much that can make it easier.

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

Sidebar

Related Questions

I would like to use dev tools like FireBug or the elements built into
I use several custom tools during the build process, mostly code generators for service
I have tools like firebug and web developer to debug the code with firefox
I would like to know how I can use a debugger (Firebug or IE's
I'd like to use org.hibernate.tool.hbm2ddl.SchemaExport from hibernate-core 4.1.4 to generate/export a Sybase ASE 15.5
Is it possible to use VS 2012 diff tool from console like below? compare.exe
What tool or method can I use to see what code something like an
Is there any way to use common tools (ffmpeg? mplayer/mencoder? mkvmerge? etc ) to
Suppose I'm designing a robot that can pickup various tools and use them. I
what tools do you use for writing jquery code and testing/debugging your code?

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.