Results 1 to 7 of 7

Thread: Users can bypass field requirements and format restrictions when submitting ads

  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

    Users can bypass field requirements and format restrictions when submitting ads

    Here is how you can reproduce this bug, still present in CP 3.3.3 although it was reported prior to the release of 3.3.1 (here).

    Go to a ClassiPress site. You can use the AppThemes demo site to witness the bug, although they don't allow posting of actual ads so you won't be able to do the final step.

    1. Start creating a new ad. Select a category (e.g. Auto > Boats > Sail boats).

    2. Notice “Title”, “Price”, “State” , “City”, and “Description” are required (the fields have asterisks).

    3. Fill out all of those fields except for “Price” (leave that one blank).

    4. Use a live HTML inspector (e.g. in FireFox, right-click the “Price” field and press “Q”; or use Firebug) to remove the “required” class from the “cp_price” <input> element. See screenshot below:

    edit-html.png

    5. Click the “Continue” button to submit the form.

    6. Notice the “Price” field is empty in the “Review Your Listing” page (see screenshot below). Whatever server-side validation was done to the field didn’t catch it.

    review-listing.png

    Final Step:

    Since the ClassiPress demo site won’t allow visitors to post ads, I performed the above steps on another ClassiPress-based site I found online. I was able to post an ad without a required price.

    ad-without-price.png

    Another way to say this: AppThemes is relying on CLIENT-SIDE validation instead of SERVER-SIDE validation before inserting data into the database. Users can circumvent our custom field rules using the steps above.
    Last edited by almightyeric; May 10th, 2014 at 11:20 PM. Reason: add introductory sentence

  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
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    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!

  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!

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

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

  8. The Following User Says Thank You to samcy For This Useful Post:

    almightyeric (September 4th, 2014)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Description field requires a click after submitting ad to work - html enabled
    By canadawebservices in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: April 19th, 2014, 05:35 AM
  2. Job URL field when submitting Job...
    By rrabines in forum Report JobRoller Bugs
    Replies: 3
    Last Post: May 26th, 2012, 04:29 PM
  3. Website field when submitting a job
    By rose in forum Report JobRoller Bugs
    Replies: 8
    Last Post: April 4th, 2011, 06:32 PM
  4. Users receiving error message when submitting an ad
    By jeffprov in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: August 2nd, 2010, 11:21 PM