Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58646 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56854 invoked from network); 6 Mar 2012 09:38:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2012 09:38:45 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.123 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.123 smtp123.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.123] ([207.97.245.123:43230] helo=smtp123.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/0A-34145-42BD55F4 for ; Tue, 06 Mar 2012 04:38:45 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp52.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 3FB6C241E04; Tue, 6 Mar 2012 04:38:41 -0500 (EST) X-Virus-Scanned: OK Received: by smtp52.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id D435A241CF3; Tue, 6 Mar 2012 04:38:40 -0500 (EST) Message-ID: <4F55DB1F.5040108@sugarcrm.com> Date: Tue, 06 Mar 2012 01:38:39 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1 MIME-Version: 1.0 To: Adam Jon Richardson CC: "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Providing sandboxed versions of include and require language constructs From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Thoughts? This is a fine idea, however actually doing it is not that easy. Note that knowing which function is "safe" is pretty hard, but that's only a start. Plugin code, for example, can call functions outside plugin context, while passing all kinds of arguments - is it safe or not? It depends on the context - e.g. plugin may need access to the database - directly or through some API - but that opens the door to various SQL injections and other mischief, etc. etc. So while the idea is fine, designing a working sandbox is a very complicated task. That said, if you have any ideas - you're welcome to propose. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227