Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2014
    Posts
    14
    Plugin Contributions
    0

    Default Security concern of custom password protection form

    I have made a custom form by adding a new header and tpl file. This form is redirected to if certain categories and its containing products are accessed which if so the user is redirected to my custom form that asks for a password. But I had a question on security issues as I don't want to open myself up to sql injections. This is what I have done and it is working perfectly:

    1) Altered database to include a extra column in categories called 'pw'. Used the ppc mod from stevish as a base to make the extra field show in admin

    2) Tpl file - added the form for the password input

    3) Header file for custom form - added code to retrieve the 'pw' that shows as this

    Code:
    $categories_pw_obj = $db->Execute("SELECT pw FROM " . TABLE_CATEGORIES . " WHERE categories_id=67");
    $categories_pw = $categories_pw_obj->fields['pw'];
    What my header file does is IF the $user_pw matches the $categories_pw then I have it save both $user_pw and $categories_pw in SESSIONS. With these sessions, my product_info and index headers will see if they match and if so, allow access to those categories and products.

    My Concern is mostly on the header file for the custom form I did as I know that versions of ZC after the ppc mod came out uses 'bindvars' in the database pull. But I was wondering, if my form only checks the user input against the password set in admin, is this still open for attacks? Is their anything I should be aware of when doing a form like this to protect my site.

    Appreciate any insight.
    Last edited by mtncycling; 31 Jan 2014 at 12:59 AM.

 

 

Similar Threads

  1. Password Protection
    By patchbrother in forum General Questions
    Replies: 5
    Last Post: 23 Jun 2011, 05:23 PM
  2. Password protection
    By rollow in forum General Questions
    Replies: 2
    Last Post: 21 Jun 2010, 01:58 PM
  3. Password Protection Directories
    By floatman in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 30 Dec 2007, 04:15 AM
  4. How do I remove password protection on my site?
    By strobogirl in forum Installing on a Windows Server
    Replies: 1
    Last Post: 14 Jun 2007, 12:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR