Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - Other
Author Message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1242

PostPosted: Wed Sep 01, 2010 7:08 am Reply with quote

See:


Only registered users can see links on this board! Get registered or login!


Interesting read, thought maybe someone would be interested.
 
View user's profile Send private message
djmaze
Subject Matter Expert


Joined: May 15, 2004
Posts: 719
Location: http://tinyurl.com/5z8dmv

PostPosted: Wed Sep 01, 2010 10:08 am Reply with quote

It's a well known problem but, which PHP newbie reads this kind of stuff?
After all, the target audience should be newbies.

I've solved this issue much cleaner:
Code:
class SecureGET

{
    private static $GET;
    function __construct()
    {
        if (!self::$GET) self::$GET = $_GET;
    }
    public function int($key) { return isset(self::$GET[$key]) ? intval(self::$GET[$key]) : null; }
    # etc.
}
$_GET = new SecureGET();
$_GET->int('post_id');


Now if PHP had this in the first place.......
 
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Wed Sep 01, 2010 11:13 am Reply with quote

Nice. So since it doesn't have it....where's the rest of the functions? Smile

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
dad7732
PostPosted: Wed Sep 01, 2010 11:19 am Reply with quote

Quote:
which PHP newbie reads this kind of stuff?


Me, I am less than a "newbie" when it comes to PHP, so most of this stuff is interesting from my POV .. Smile

Cheers
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - Other

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©