Added security for experimental module manager

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63535 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-10-02 21:01:45 +00:00
parent 5478c88583
commit 47f40ed6bd

View File

@ -25,6 +25,8 @@ class ModuleManager extends RequestHandlingData {
* Usage: sake dev/modules/add ecommerce forum/tags/0.1 * Usage: sake dev/modules/add ecommerce forum/tags/0.1
*/ */
function add() { function add() {
if(!Director::is_cli()) return new HTTPResponse('ModuleManager only currently works in command-line mode.', 403);
if(isset($_GET['args'])) { if(isset($_GET['args'])) {
$modules = $_GET['args']; $modules = $_GET['args'];
foreach($modules as $module) { foreach($modules as $module) {