mirror of
				https://github.com/getgrav/grav-plugin-admin.git
				synced 2025-10-31 10:25:50 +01:00 
			
		
		
		
	Made path handling unicode-safe, use new Utils::basename() and Utils::pathinfo() everywhere
				
					
				
			This commit is contained in:
		| @@ -15,6 +15,7 @@ use Grav\Common\Page\Pages; | ||||
| use Grav\Common\Uri; | ||||
| use Grav\Common\User\Interfaces\UserCollectionInterface; | ||||
| use Grav\Common\User\Interfaces\UserInterface; | ||||
| use Grav\Common\Utils; | ||||
| use Grav\Framework\RequestHandler\Exception\PageExpiredException; | ||||
| use Grav\Framework\RequestHandler\Exception\RequestException; | ||||
| use Grav\Plugin\Admin\Admin; | ||||
| @@ -111,7 +112,7 @@ class LoginController extends AdminController | ||||
|     { | ||||
|         $uri = (string)$this->getRequest()->getUri(); | ||||
|  | ||||
|         $ext = pathinfo($uri, PATHINFO_EXTENSION); | ||||
|         $ext = Utils::pathinfo($uri, PATHINFO_EXTENSION); | ||||
|         $accept = $this->getAccept(['application/json', 'text/html']); | ||||
|         if ($ext === 'json' || $accept === 'application/json') { | ||||
|             return $this->createErrorResponse(new RequestException($this->getRequest(), $this->translate('PLUGIN_ADMIN.LOGGED_OUT'), 401)); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user