* [MOD] Improved plugins management

* [MOD] Code refactoring

Signed-off-by: nuxsmin <nuxsmin@syspass.org>
This commit is contained in:
nuxsmin
2018-10-15 02:56:00 +02:00
parent 6b6d4a0f23
commit 7f2dd35059
47 changed files with 1245 additions and 681 deletions

View File

@@ -374,8 +374,11 @@ final class Request
public function verifySignature(string $key, string $param = null)
{
$result = false;
$hash = $this->params->get('h');
if (($hash = $this->params->get('h')) !== null) {
if ($hash !== null) {
// Strips out the hash param from the URI to get the
// route which will be checked against the computed HMAC
if ($param === null) {
$uri = str_replace('&h=' . $hash, '', $this->request->uri());
$uri = substr($uri, strpos($uri, '?') + 1);