www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Server-Side Development > PHP

    PHP Discussion and technical support for using and deploying PHP based websites.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 11-07-2009, 06:37 AM
    lukaz lukaz is offline
    Registered User
     
    Join Date: Oct 2009
    Posts: 62
    Security issue hidden form field

    I have designed a form class that builds and validates forms, however the validation is done like so:

    If an input is nessersary (needs to be validated) a flag is set in the class call for that input.

    the name of that field and the type are then assigned to an array and once the form is built, a hidden input is added that has the values of the validation array in it as a seralized array.

    I was just looking at it though and wondered if that means it is an easy target for XSS? Could someone just post an empty array for my hidden value and circumvent the validation?

    If so would it be better to assign the arrays to session variables?

    If this doesnt make sense I can post some of my code up or try and explain myself better.

    cheers
    lukaz
    Reply With Quote
      #2  
    Old 11-07-2009, 08:50 AM
    NogDog's Avatar
    NogDog NogDog is offline
    High Energy Magic Dept.
     
    Join Date: Aug 2004
    Location: Ankh-Morpork
    Posts: 13,641
    Quote:
    Originally Posted by lukaz View Post
    ... Could someone just post an empty array for my hidden value and circumvent the validation?
    Yes.
    Quote:
    If so would it be better to assign the arrays to session variables?
    Yes.
    __________________
    "That's what the gods are! An answer that will do! Because there's food to be caught and babies to be born and life to be lived and so there is not time for big, complicated, and worrying answers! Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." -- from Nation, by Terry Pratchett
    freelancer.internet.com
    Email me
    Reply With Quote
      #3  
    Old 11-07-2009, 08:58 AM
    lukaz lukaz is offline
    Registered User
     
    Join Date: Oct 2009
    Posts: 62
    Lol thanks
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 09:09 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.