Is there a code so that nobody can inject me?

Results 1 to 7 of 7
  1. #1
    Member RetroMakerD is offline
    MemberRank
    Aug 2013 Join Date
    Netherlands NLLocation
    61Posts

    ! Is there a code so that nobody can inject me?

    Hello :)

    I need to find a way out on how to secure my sql db. I am using RevCMS. And i need to secure it somehow or else everyone can hack it :(

    i found a little code online though :
    http://forum.ragezone.com/f528/share...on-php-707186/

    But i dont know if that works for habbo retros and where to put it? In every php file 0_0



  2. #2
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,608Posts

    Re: Is there a code so that nobody can inject me?

    The only code to prevent SQL injections in prepared statements or filter everything but wouldn't rely on the last option.

  3. #3
    Member RetroMakerD is offline
    MemberRank
    Aug 2013 Join Date
    Netherlands NLLocation
    61Posts

    Re: Is there a code so that nobody can inject me?

    How would i do that?

  4. #4
    j’aime ma famille dominic is offline
    MemberRank
    Aug 2012 Join Date
    ~/Location
    611Posts

    Re: Is there a code so that nobody can inject me?

    Pff, easy.
    Code:
    foreach ($_POST as $key => $value) {
    	$_POST[$key] = secureMethod($value);
    }
    
    foreach ($_GET as $key => $value) {
    	$_GET[$key] = secureMethod($value);
    }

  5. #5
    Member RetroMakerD is offline
    MemberRank
    Aug 2013 Join Date
    Netherlands NLLocation
    61Posts

    Re: Is there a code so that nobody can inject me?

    Andddd where do i place that code????

  6. #6
    j’aime ma famille dominic is offline
    MemberRank
    Aug 2012 Join Date
    ~/Location
    611Posts

    Re: Is there a code so that nobody can inject me?

    In a file that is included on every single page, e.g. the configuration file.

  7. #7
    Member RetroMakerD is offline
    MemberRank
    Aug 2013 Join Date
    Netherlands NLLocation
    61Posts

    Re: Is there a code so that nobody can inject me?

    Thank you :)



Advertisement