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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:02:48+00:00 2026-05-24T20:02:48+00:00

I have recently inherited a large website. I have been checking it for security

  • 0

I have recently inherited a large website. I have been checking it for security flaws.

I have the following code, which is called when the user submits an update to their user details:

// Ajax request
new Request.JSON({ method: 'get', url: 'ajax.ashx', autoCancel: true, urlEncoded: false, secure: false,
    headers: { "Content-type": "application/json" },
    onSuccess: function (_json) {
        if (!_json.error) {
            $('inp_firstname').value = _json.fn;
            $('inp_surname').value = _json.sn;
            $('usr_Country').value = $(ddlCountry0).getSelected()[0].get('text');
            $('inp_companyname').value = _json.cn;
            $('inp_website').value = _json.ws;
            $('inp_facebook').value = _json.fb;
            $('inp_twitter').value = _json.tw;
            $('bus_Activity').value = $(ddlActivity0).getSelected()[0].get('text');
            $('private_contacts').value = $(chkPrivateContacts).checked;

            hidePopup('editDetailsPopup');
        }
    }
}).get({ 'm': 'editDetailsPro',
    'fn': removeTags($('firstname').value),
    'sn': removeTags($('surname').value),
    'pwd': removeTags($('password').value),
    'country': $(ddlCountry0).getSelected()[0].get('value'),
    'cn': removeTags($('companyname').value),
    'ws': removeTags($('website').value),
    'ac': $(ddlActivity0).getSelected()[0].get('value'),
    'pc': $(chkPrivateContacts).checked == 1,
    'fb': removeTags($('facebooklink').value),
    'tw': removeTags($('twitterlink').value) });

It turns out that the function removeTags(); Doesn’t do anything. There is also no serverside validation of input, so this is a big security hole.

What do I need to check for clientside to make sure that legitimate users can enter their data, and are there library functions that will do all these checks for me (I couldn’t find any)? When it gets to the server, do I turn it back into its original form, or stick it into the database as it is?

  • 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-24T20:02:49+00:00Added an answer on May 24, 2026 at 8:02 pm

    MooTools has the stripTags method, I think that’s what you want: http://mootools.net/docs/more/Types/String.Extras#String:stripTags

    Might I add though that you should never do JavaScript sanitization alone? Always do server side validation and sanitization of incoming user input. Seeing as you use ASP.NET, check this link:

    • http://msdn.microsoft.com/en-us/library/ff647397.aspx
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently been doing a security code review for my company and using
I have recently inherited a website written in Classic ASP, and am currently trying
Have recently been given a project to complete which uses XML quite extensively.Am looking
Our team has recently inherited code which is extremely disorganized. As a result, my
We have a fairly large public website and have recently redsigned it with a
I have recently inherited a large web project. Before taking this on, I had
I have recently inherited some Java code and need to integrate it into a
I have recently been playing with Massive, a Micro-ORM which returns collections of IEnumerable<dynamic>.
I recently inherited a VBA macro that needs to have validation logic added to
I have recently been doing a bit of investigation into the different types of

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.