Re: cvs: php4 /main safe_mode.c
| From: | Ilia A. | Date: | Fri, 16 Aug 2002 12:02:32 +0000 |
| Subject: | Re: cvs: php4 /main safe_mode.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-13404@lists.php.net to get a copy of this message | ||
Wez,
I've tried the patch and it appears to work fine and does what it should.
However, I did notice that if opening a URL fails, there appears to be a
memory leak happening in the stream code, this is an old(?) bug not related
to your path though.
Here is an example:
php -r ' var_dump(fopen("ftp://localhost",
"r")); '
Command line code(1) : Warning - fopen(ftp://localhost)
[http://www.php.net/function.fopen]: failed to create stream: FTP server
reports 500 localhost FTP server shut down -- please try again later.
bool(false)
/home/rei/PHP_CVS/php4/main/streams.c(1386) : Freeing 0x0823572C (82 bytes),
script=-
Ilia
On August 16, 2002 05:46 am, Wez Furlong wrote:
> Hi Ilia,
>
> I'm committing a patch in a moment that makes this check use the wrappers
> sub-system itself to determine if a filename is a wrapped filename.
>
> I would be grateful if you could look over it and check it through.
>
> --Wez.
>
> On 08/16/02, "Ilia Alshanetsky" <ilia@prohost.org> wrote:
> > iliaa Thu Aug 15 23:52:38 2002 EDT
> >
> > Modified files:
> > /php4/main safe_mode.c
> > Log:
> > Make https:// be exempt from safe_mode checks, just like
> > http:// &
> > ftp:// are.
> >
> > - if (!strncasecmp(filename,"http://", 7) ||
> > !strncasecmp(filename,"ftp://", 6)) { + if
> > (!strncasecmp(filename,"http://", 7) ||
> > !strncasecmp(filename,"ftp://",
> > 6) || !strncasecmp(filename,"https://", 8)) {
> > return 1;