Skip to content

Commit

Permalink
Merge tag '5.7.5.11'
Browse files Browse the repository at this point in the history
Tagging version 5.7.5.11
  • Loading branch information
KorvinSzanto committed Dec 12, 2016
2 parents 71c1e4a + 745f3ae commit 1ddbb4b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 19 deletions.
4 changes: 2 additions & 2 deletions build/tasks/build-release/download.js
@@ -1,5 +1,5 @@
module.exports = function(grunt, config, parameters, done) {
var zipUrl = parameters.releaseSourceZip || 'https://github.com/concrete5/concrete5/archive/release/5.7.5.10.zip';
var zipUrl = parameters.releaseSourceZip || 'https://github.com/concrete5/concrete5/archive/release/5.7.5.11.zip';
var workFolder = parameters.releaseWorkFolder || './release';
function endForError(e) {
process.stderr.write(e.message || e);
Expand Down Expand Up @@ -52,4 +52,4 @@ module.exports = function(grunt, config, parameters, done) {
endForError(e);
return;
}
};
};
4 changes: 2 additions & 2 deletions web/concrete/config/concrete.php
Expand Up @@ -7,8 +7,8 @@
*
* @var string
*/
'version' => '5.7.5.10',
'version_installed' => '5.7.5.10',
'version' => '5.7.5.11',
'version_installed' => '5.7.5.11',
'version_db' => '20160615000000', // the key of the latest database migration

/**
Expand Down
6 changes: 1 addition & 5 deletions web/concrete/src/Block/BlockController.php
Expand Up @@ -480,11 +480,7 @@ public function isValidControllerTask($method, $parameters = array())
// how do we get <= 1? If it's 1, that means that the method has one fewer param. That's ok because
// certain older blocks don't know that the last param ought to be a $bID. If they're equal it's zero
// which is best. and if they're greater that's ok too.
// Now let's see if the action is for this block instance
$bID = array_pop($parameters);
if ((is_string($bID) || is_int($bID)) && $bID == $this->bID) {
return true;
}
return true;
}
}

Expand Down
4 changes: 4 additions & 0 deletions web/concrete/src/Page/Controller/DashboardPageController.php
Expand Up @@ -11,6 +11,10 @@ class DashboardPageController extends PageController
/** @var Error */
protected $error;

protected $restrictedMethods = array(
'enableNativeMobile'
);

/** @var Token */
public $token;
protected $helpers = array('form');
Expand Down
21 changes: 20 additions & 1 deletion web/concrete/src/Page/Controller/PageController.php
Expand Up @@ -20,6 +20,12 @@ class PageController extends Controller
protected $passThruBlocks = array();
protected $parameters = array();

/**
* array of method names that can't be called through the url
* @var array
*/
protected $restrictedMethods = array();

public function supportsPageCache()
{
return $this->supportsPageCache;
Expand Down Expand Up @@ -166,11 +172,24 @@ public function setupRequestActionAndParameters(Request $request)
}

$foundTask = false;
$restrictedControllers = array(
'Concrete\Core\Controller\Controller',
'Concrete\Core\Controller\AbstractController',
'Concrete\Core\Page\Controller\PageController'

);
try {
$r = new \ReflectionMethod(get_class($this), $method);
$cl = $r->getDeclaringClass();
if (is_object($cl)) {
if ($cl->getName() != 'Concrete\Core\Controller\Controller' && strpos($method, 'on_') !== 0 && strpos($method, '__') !== 0 && $r->isPublic()) {
if (
!in_array($cl->getName(), $restrictedControllers)
&& strpos($method, 'on_') !== 0
&& strpos($method, '__') !== 0
&& $r->isPublic()
&& !$r->isConstructor()
&& (is_array($this->restrictedMethods) && !in_array($method, $this->restrictedMethods))
) {
$foundTask = true;
}
}
Expand Down
9 changes: 0 additions & 9 deletions web/concrete/src/Utility/Service/Identifier.php
Expand Up @@ -5,15 +5,6 @@
use Concrete\Core\Support\Facade\Application;
use Hautelook\Phpass\PasswordHash;

/**
* \@package Helpers
* @subpackage Validation
*
* @author Andrew Embler <andrew@concrete5.org>
* @copyright Copyright (c) 2003-2008 Concrete5. (http://www.concrete5.org)
* @license http://www.concrete5.org/license/ MIT License
*/

/**
* A helper that allows the creation of unique strings, for use when creating hashes, identifiers.
*
Expand Down

0 comments on commit 1ddbb4b

Please sign in to comment.