Welcome to the RaGEZONE - MMORPG development forums.

PHOENIXPHP AND OTHER CMS: Fix (almost) all SQL injection holes

This is a discussion on PHOENIXPHP AND OTHER CMS: Fix (almost) all SQL injection holes within the Habbo Releases forums, part of the Habbo Hotel category; Sick of fixing all sql injections in PhoenixPHP? Here's a little tip to fix (almost) all holes! step 1: open ...

LyncusMU
Page 1 of 3 123 LastLast
Results 1 to 15 of 41
  1. #1
    Average Member
    Rank
    Newbie
    Join Date
    Oct 2009
    Posts
    52
    Liked
    11

    PHOENIXPHP AND OTHER CMS: Fix (almost) all SQL injection holes

    Tabo Hotel
    Sick of fixing all sql injections in PhoenixPHP? Here's a little tip to fix (almost) all holes!
    step 1: open global.php
    step 2 add under "$users = new Users();"

    PHP Code:
    foreach($_GET as $key => $value){
    $_GET[$key]=$core->EscapeString($value);
    }
    foreach(
    $_POST as $key => $value){
    $_POST[$key]=$core->EscapeString($value);
    }
    foreach(
    $_REQUEST as $key => $value){
    $_REQUEST[$key]=$core->EscapeString($value);

    step 3: Save and you're done!

    PS: you can use it for other cmses also: add this to a file like global.php or config.php
    PHP Code:
    foreach($_GET as $key => $value){
    $_GET[$key]=mysql_real_escape_string(stripslashes(trim(htmlspecialchars($value))));
    }
    foreach(
    $_POST as $key => $value){
    $_POST[$key]=mysql_real_escape_string(stripslashes(trim(htmlspecialchars($value))));
    }
    foreach(
    $_REQUEST as $key => $value){
    $_REQUEST[$key]=mysql_real_escape_string(stripslashes(trim(htmlspecialchars($value))));

    Last edited by imstr; 06-01-12 at 09:58 PM.

  2. HostKey.com: Unmetered Dedicated servers in the Netherlands
  3. #2
    Delta Subscription
    Rank
    Subscriber
    Join Date
    Nov 2008
    Location
    Manchester, UK
    Posts
    3,264
    Liked
    821

    Re: PHOENIXPHP: Fix (almost) all SQL injection holes

    Surprised someone never released something like this before. Nice work :)

  4. #3
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Jul 2011
    Location
    Everywhere i go
    Posts
    206
    Liked
    32

    Re: PHOENIXPHP: Fix (almost) all SQL injection holes

    Ah, good work my friend!

  5. #4
    PHP, HTML5, CSS3, JS, C#
    Rank
    Alpha Member
    Join Date
    Jun 2010
    Location
    The Netherlands
    Posts
    1,814
    Liked
    1013

    Re: PHOENIXPHP: Fix (almost) all SQL injection holes

    Quote Originally Posted by Hejula View Post
    Surprised someone never released something like this before. Nice work :)
    It's in brickphp? visualccms?

  6. #5
    Delta Subscription
    Rank
    Subscriber
    Join Date
    Nov 2008
    Location
    Manchester, UK
    Posts
    3,264
    Liked
    821

    Re: PHOENIXPHP: Fix (almost) all SQL injection holes

    Quote Originally Posted by joopie View Post
    It's in brickphp? visualccms?
    Not PhoenixPHP though. + No one has made this as release...

  7. #6
    Average Member
    Rank
    Newbie
    Join Date
    Oct 2009
    Posts
    52
    Liked
    11

    Re: PHOENIXPHP: Fix (almost) all SQL injection holes

    Quote Originally Posted by joopie View Post
    It's in brickphp? visualccms?
    Never used those. Didn't know it was possible before i wrote it.

  8. #7
    I'm not saying i am god.
    Rank
    Member +
    Join Date
    Jan 2010
    Location
    Pixelen-Studios
    Posts
    263
    Liked
    31

    thumbs up Re: PHOENIXPHP: Fix (almost) all SQL injection holes

    You did a great Job dude!

    Greetz,

  9. #8
    Now 35% cooler!
    Rank
    Alpha Member
    Join Date
    Oct 2008
    Location
    United Kingdom
    Posts
    2,071
    Liked
    353

    Re: PHOENIXPHP: Fix (almost) all SQL injection holes

    Good job!

  10. #9
    Red like a Tomato!
    Rank
    Member +
    Join Date
    Nov 2007
    Location
    Netherlands
    Posts
    310
    Liked
    15

    Re: PHOENIXPHP: Fix (almost) all SQL injection holes

    thanks!

  11. #10
    Monster Member
    Rank
    Member
    Join Date
    Jun 2007
    Location
    United Kingdom
    Posts
    191
    Liked
    50

    Re: PHOENIXPHP: Fix (almost) all SQL injection holes

    thanks dude

  12. #11
    MEHHREKHwhgfkehrkgthregir
    Rank
    Member +
    Join Date
    Sep 2011
    Location
    υηιтє∂
    Posts
    925
    Liked
    303

    Re: PHOENIXPHP AND OTHER CMS: Fix (almost) all SQL injection holes

    Wait, so all this guy did was take this code out of BrickPHP and then just release it? O.o

  13. #12
    The Omega
    Rank
    Member
    Join Date
    Jul 2009
    Location
    Netherlands
    Posts
    108
    Liked
    35

    Re: PHOENIXPHP AND OTHER CMS: Fix (almost) all SQL injection holes

    Quote Originally Posted by imstr View Post
    Sick of fixing all sql injections in PhoenixPHP? Here's a little tip to fix (almost) all holes!
    step 1: open global.php
    step 2 add under "$users = new Users();"

    PHP Code:
    foreach($_GET as $key => $value){
    $_GET[$key]=$core->EscapeString($value);
    }
    foreach(
    $_POST as $key => $value){
    $_POST[$key]=$core->EscapeString($value);
    }
    foreach(
    $_REQUEST as $key => $value){
    $_REQUEST[$key]=$core->EscapeString($value);

    step 3: Save and you're done!

    PS: you can use it for other cmses also: add this to a file like config.php
    PHP Code:
    foreach($_GET as $key => $value){
    $_GET[$key]=mysql_real_escape_string(stripslashes(trim(htmlspecialchars($value))));
    }
    foreach(
    $_POST as $key => $value){
    $_POST[$key]=mysql_real_escape_string(stripslashes(trim(htmlspecialchars($value))));
    }
    foreach(
    $_REQUEST as $key => $value){
    $_REQUEST[$key]=mysql_real_escape_string(stripslashes(trim(htmlspecialchars($value))));

    You're telling me i ripped? rofl! Look at the filters. You use 20, i use 1! :)

  14. #13
    Average Member
    Rank
    Newbie
    Join Date
    Oct 2009
    Posts
    52
    Liked
    11

    Re: PHOENIXPHP AND OTHER CMS: Fix (almost) all SQL injection holes

    Quote Originally Posted by ησвяαιη View Post
    Wait, so all this guy did was take this code out of BrickPHP and then just release it? O.o
    actualy i never used BrickPHP. I wrote it myself. It could be that the same code is in BrickPHP

    Quote Originally Posted by Mister. M View Post
    You're telling me i ripped? rofl! Look at the filters. You use 20, i use 1! :)
    i used the standard filter of phoenixphp

  15. #14
    Developer
    Rank
    Member +
    Join Date
    May 2008
    Posts
    482
    Liked
    201

    Re: PHOENIXPHP AND OTHER CMS: Fix (almost) all SQL injection holes

    Stop giving the guy a hard time. This is very useful and effective. Yes joopie has code similar to this but this guy made it work for phoenixphp and will help a lot of people.

    Good job.
    Posted via Mobile Device
    imstr likes this.

  16. #15
    Delta Subscription
    Rank
    Subscriber
    Join Date
    Nov 2008
    Location
    Manchester, UK
    Posts
    3,264
    Liked
    821

    Re: PHOENIXPHP AND OTHER CMS: Fix (almost) all SQL injection holes

    Quote Originally Posted by ησвяαιη View Post
    Wait, so all this guy did was take this code out of BrickPHP and then just release it? O.o
    Lol, piss off. This is a generic foreach statement, anyone could have made it. It was not trademarked of BrickPHP because it had it first.

 

 
Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •