]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check whether the Key is set
authorLukas Reschke <lukas@statuscode.ch>
Tue, 18 Feb 2014 11:47:05 +0000 (12:47 +0100)
committerLukas Reschke <lukas@statuscode.ch>
Tue, 18 Feb 2014 11:47:05 +0000 (12:47 +0100)
core/ajax/appconfig.php

index 6629d8a664b366ec4c0d7ab8c2ee22543c404b1e..1d066d9169a8a654039fa92063ce345c2a91896e 100644 (file)
@@ -15,7 +15,7 @@ $app=OC_App::cleanAppId(isset($_POST['app'])?$_POST['app']:$_GET['app']);
 // on its own. This should only be possible programmatically.
 // This change is due the fact that an admin may not be expected 
 // to execute arbitrary code in every environment.
-if($app === 'core' && (substr($_POST['key'],0,7) === 'remote_' || substr($_POST['key'],0,7) === 'public_')) {
+if($app === 'core' && isset($_POST['key']) &&(substr($_POST['key'],0,7) === 'remote_' || substr($_POST['key'],0,7) === 'public_')) {
        OC_JSON::error(array('data' => array('message' => 'Unexpected error!')));
        return;
 }