Activity Stream
48,167 MEMBERS
6873 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38
  1.     
    #31
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    XSS Filtering is not easy to get perfect but you can prevent alot of attacks by attempting to convert the source value (search,comment) into its entities.

    Usually when i build a system i will sanitize all input as stranded !

    For instance
    PHP Code: 
    function sanitize($input)
    {
        if(
    is_array($input))
        {
            
    $temp = array();
            foreach(
    $input as $k => $v)
            {
                 
    $temp[$k] = sanitize($v);
            }
            return 
    $temp;
        }
        return 
    htmlentities($input,ENT_QOUTES);
    }

    $_GET sanitize($_GET);
    $_POST sanitize($_POST);

    $search $_GET['search']; 
    If a user posts in your search box something like "<div />" the value of $search about will be "&lt;div /&gt;".

    so if you use $search in your template / html file its pretty safe.

    Also take note of Strip Tags and Filter Var in PHP
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  2.     
    #32
    Member
    litewarez thanks for the code.

    I just found this
    http://htmlpurifier.org/
    Coding Horror Fan
    I don't read PM's frequently .

  3.     
    #33
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    i ment to mention that to you but i forgot to add it to the topic..

    that peice of kit is really really good and cuts out a loads of possibilities but its very bulky for its single purpose.
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  4.   Sponsored Links

  5.     
    #34
    Moderator
    NewEraCracker's Avatar
    And what about null bytes?
    Code: 
    http://php.net/manual/en/security.filesystem.nullbytes.php
    and btw I null scripts my own when I can. If I can't or don't have time, then I use DGT or FS nulls.
    Trusted: Dom, l0calh0st, 0ccul7, robert420
    Find all threads started by NewEraCracker

  6.     
    #35
    Respected Member
    Thread unstuck, mainly due to inactivity and the fact that litewarez himself stickied this thread when he was moderator.

  7.     
    #36
    Member
    Website's:
    ExpresShare.com
    I just wanted to talk about the PL1 fix for vbulletin 3.8.6
    you have to save this code in a file and upload it to your server(login as admin maybe required since I was logged in as amin when I tested it )
    PHP Code: 
    <?php
    require_once('global.php'); 
    $db->query_write("DELETE from " TABLE_PREFIX "phrase WHERE varname = 'database_ingo'"); 
    echo 
    "successfully patched";
    ?>
    and then just navigate to it using your browser
    that was the PL1 fix.
    @NewEraCracker
    for null byte vuln you can use addslashes

  8.     
    #37
    Moderator
    NewEraCracker's Avatar
    Thanks for the info
    Trusted: Dom, l0calh0st, 0ccul7, robert420
    Find all threads started by NewEraCracker

  9.     
    #38
    Member
    small sanitizing function

    PHP Code: 

        
    function sanitize($str)
        {
            return 
    strtolower(strip_tags(trim(($str))));
        } 
    Coding Horror Fan
    I don't read PM's frequently .

Page 4 of 4 FirstFirst ... 234

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Defendos Security - Official Thread
    By l0calh0st in forum Web Development Area
    Replies: 40
    Last Post: 31st Oct 2012, 03:54 PM
  2. Hosting Tutorials,Tips,Security,General | PhotonServers
    By ChosenOne in forum Useful Sites
    Replies: 9
    Last Post: 20th May 2010, 10:10 AM
  3. Replies: 14
    Last Post: 19th May 2010, 06:07 PM
  4. [LE] PhotonServers.NET | Hosting Tutorials,Tips,Security,General
    By Raptile in forum Traffic Market (Buy, Sell and Trade)
    Replies: 9
    Last Post: 14th May 2010, 06:11 AM
  5. Security Tips
    By sniper in forum Webmaster Discussion
    Replies: 6
    Last Post: 11th Feb 2010, 10:28 AM

Tags for this Thread

BE SOCIAL