Results 1 to 5 of 5

Thread: User can choose non-existent ad category

  1. #1
    Thread Starter
    Veteran almightyeric's Avatar
    Join Date
    Aug 2011
    Location
    Nothern CA, USA
    Posts
    416
    Thanks
    56
    Thanked 19 Times in 16 Posts

    User can choose non-existent ad category

    There is a bug in step 1 of the ad posting process.

    A user can modify the POST submission (on the client side) using a tool such as the Firefox "Tamper Data" plugin.
    The user can set the value of the "cat" parameter to an integer value that does not correspond to any existing ad category.

    For example, suppose I have a site with ad categories with IDs of: "9", "13", "14". In this case, the category selection input (i.e. dropdown menu) on step 1 will have 4 items: the three categories, plus the "Select one" prompt (which has a "cat" value of "-1").

    Normal scenario:

    Normally, a user selects an option from the menu (e.g. "Cars and Trucks" which we can pretend has a value of "13") and presses the Submit button. When the user clicks the Submit button, the form will be submitted with the "cat" parameter set to "13". The next page will show the category by name: "Cars and Trucks." Everything is normal.

    Now for the hacked scenario:

    Suppose the user can modifies the POST data (which they can do... I just did using the plugin I mentioned above) and set "cat" equal to "999" (which does not correspond to an existing ad category). ClassiPress will accept this submission and continue on to the next step of the New Ad process like nothing is wrong.

    Here is a graphical representation of the two scenarios:

    classipress_category_selection_bug.jpg

    I recommend AppThemes implement server-side validation of this form (and all forms), so the theme rejects submissions containing invalid ad category IDs.

  2. #2
    Thread Starter
    Veteran almightyeric's Avatar
    Join Date
    Aug 2011
    Location
    Nothern CA, USA
    Posts
    416
    Thanks
    56
    Thanked 19 Times in 16 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    Thread Starter
    Veteran almightyeric's Avatar
    Join Date
    Aug 2011
    Location
    Nothern CA, USA
    Posts
    416
    Thanks
    56
    Thanked 19 Times in 16 Posts

    Temporary workaround

    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

  5. #5
    Thread Starter
    Veteran almightyeric's Avatar
    Join Date
    Aug 2011
    Location
    Nothern CA, USA
    Posts
    416
    Thanks
    56
    Thanked 19 Times in 16 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: November 17th, 2011, 11:35 AM
  2. Can I fors user to choose a subcategories over their parent categories
    By mouradbouikni in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: May 5th, 2011, 07:42 PM
  3. User can choose his own password
    By eimoheiba in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: February 22nd, 2011, 10:05 AM
  4. I donīt want to choose a category, I want a default category
    By dvmblues in forum ClassiPress General Discussion
    Replies: 1
    Last Post: March 10th, 2010, 02:57 PM