Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Securing my site...

    Ok, I've read the security info in the docs folder, but I has a couple of questions regarding the best secutiry practices.

    1 - When creating the default .htaccess file (that blocks direct access to .txt and .php files) is there a reason we do not simply block direct access to *.* (all files)?

    2 - How can I prevent people from stealing my images from my images folder? Use a similar .htaccess method - like the above?

    3 - I understand the use of "blank" .html files in certain folders. Would setting up a redirect (to my homepage) in these files be silly (security-wise)?

    Anyone able to help with this?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Securing my site...

    1. You still need to be able to access the .css and .jpg/.gif etc files

    2. You can use a .htaccess method, but it can't be simply a *.xxx sort of mask. You need to check where they're coming from. There are published .htaccess methods to prevent image theft. I haven't seen one that works 100% reliably. If not done properly, even your customers will not be able to see your images.

    3. Yes, you can do that if you like. It might be more advised to use an index.php that has a header() redirect that sends a 404-not-found or a 301-moved header so that folks don't keep attempting access to it
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Securing my site...

    Thanks for the info.

    Do you think you could explain how to create the index.php with the header a little more. I'm sure I can implement this fairly easiler... with a little help from the doc!

    Thanks. :)

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Securing my site...

    PHP Code:
    <?php
        session_write_close
    ();
        
    header("HTTP/1.1 404 Page Not Found"); 
        
    header('Location: ' 'http://' $_SERVER['HTTP_HOST']);
        exit();
    ?>
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Securing my site...

    Thanks for this.

    I tried replacing all index.html files with the php code below and something strange happened... When accessing my site root the php code was being called, which meant that I couldn't progress through the site.

    Do you know any reason why this is happening?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Securing my site...

    if you had an index.html in the root of your site, you should not have touched it, as it is called before anything else is.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Securing my site...

    I don't recall touching this file. However, I did rush this so I better try it again.

    Will post 2nd results soon.

  8. #8
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Securing my site...

    Ok, I found the problem.

    When adding the index.php file to the following dirs my site would forward to the root of my web server.

    admin\includes\extra_configures

    and

    includes\functions\extra_functions

    So I didn't put the files there!

    I really like the way these files work, however, since they are php access is not granted to them (due to some .htaccess files). I would like to keep the .htaccess files there (for obvious security reasons), but is there a way I can bypass the restriction on .php files for inde.php only?

  9. #9
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Securing my site...

    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Mar 2006
    Posts
    919
    Plugin Contributions
    2

    Default Re: Securing my site...

    I was thinking of using a metatag-redirect in the index.html files and probably will do now.

    Thanks for the help. :)

 

 

Similar Threads

  1. SSL Certifacte not securing site
    By Failed_Attempt in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 Nov 2008, 01:39 PM
  2. Help with securing site (SSL)
    By JulieNicole23 in forum General Questions
    Replies: 1
    Last Post: 27 Mar 2008, 04:54 AM
  3. securing site wont work
    By Dale Dugas in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 27 Jan 2008, 11:46 PM
  4. Problem with Securing my site
    By peppyone in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 26 Jul 2007, 02:17 AM

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