Re: New chmlib PHP binding

From: Date: Tue, 17 Aug 2010 08:28:09 +0000
Subject: Re: New chmlib PHP binding
References: 1 2 3 4  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-7496@lists.php.net to get a copy of this message
On Sun, Aug 15, 2010 at 3:44 PM, Gustavo Lopes <glopes@nebm.ist.utl.pt> wrote: > On Sat, 14 Aug 2010 14:55:52 +0100, Jesús Espino <jespinog@gmail.com> wrote: > >> Thanks. >> >> I think i follow all your suggestions, I have pushed the changes to >> the repository, any other suggestion?? > > I've noticed you open the file directly, without obeying > > 1) open_basedir/safe mode restrictions > 2) the virtual current directory > > If the library you're wrapping supports receiving FILE* pointer, you can > open the file with PHP's stream functions and cast the stream to FILE*. > If it only accepts paths, you must do the checks and expand the path > yourself. See e.g. here: > > http://lxr.php.net/opengrok/xref/PECL/rar/rararch.c#523 > The library only have a filename input parameter, then i have a question, is apropiated to make in the binding the function that accept FILE objects or String objects, and then put it in a temporary file, or is better to not give this options to the user?? Anyway i will try to send a patch to the upstream developer to accept FILE objects. Greetings.

« previous php.pecl.dev (#7496) next »