Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Other - Discussion
Author Message
djmaze
Subject Matter Expert



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

PostPosted: Sun Feb 22, 2009 2:01 pm Reply with quote

PHP 5 has two php.ini options to secure the server:

  • allow_url_fopen
  • allow_url_include


If they are set to "off" functions like fopen(), include() and getimgsize() don't work.
Error is: "URL file-access is disabled in the server configuration"

After investigation it seems the options work on the http stream wrapper so i've use the new function stream_wrapper_unregister() to remove the wrapper and build my own.

So i did and after a real "WTF" it worked and i bypassed the security settings!

I discovered this back in 2006 and posted it on this website and codenewbie.com after releasing it in my cvs for the CMS.

After successful reports i implemented it in Dragonfly CMS last week.

Now that the "hack" is really out in the open i reported it: http://bugs.php.net/bug.php?id=47444

However, someone marked it as "bogus" for the fact that those ini options are only there for "block drive-by abuse"

If so, why the hell does every host start to turn "off" those ini settings because "someone said so" without knowing you can override the setting?

What is your opinion?

P.S. I don't want to hear "you should write good code" since there are many that don't because they can't (yet).

_________________
$ mount /dev/spoon /eat/fun auto,overclock 0 1
ERROR: there is no spoon
http://claimedavatar.net/ 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Sun Feb 22, 2009 3:56 pm Reply with quote

Yea PHP seems to have too many ways to bypass such "security" features. Too many little things to worry about, hard to lockdown... and most hosts are lazy anyway.

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

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Other - Discussion

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 ©