Improve h-card check in mircopub request

This commit is contained in:
Jonny Barnes 2020-01-26 17:45:09 +00:00
parent 50e4848e46
commit 9589863e42

View file

@ -72,7 +72,7 @@ class MicropubController extends Controller
], 201)->header('Location', $location); ], 201)->header('Location', $location);
} }
if (request()->input('h') == 'card' || request()->input('type')[0] == 'h-card') { if (request()->input('h') == 'card' || request()->input('type.0') == 'h-card') {
if (stristr($tokenData->getClaim('scope'), 'create') === false) { if (stristr($tokenData->getClaim('scope'), 'create') === false) {
return $this->insufficientScopeResponse(); return $this->insufficientScopeResponse();
} }