Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/AphrontRequest.php
Show All 12 Lines | final class AphrontRequest { | ||||
// response the client expects. | // response the client expects. | ||||
const TYPE_AJAX = '__ajax__'; | const TYPE_AJAX = '__ajax__'; | ||||
const TYPE_FORM = '__form__'; | const TYPE_FORM = '__form__'; | ||||
const TYPE_CONDUIT = '__conduit__'; | const TYPE_CONDUIT = '__conduit__'; | ||||
const TYPE_WORKFLOW = '__wflow__'; | const TYPE_WORKFLOW = '__wflow__'; | ||||
const TYPE_CONTINUE = '__continue__'; | const TYPE_CONTINUE = '__continue__'; | ||||
const TYPE_PREVIEW = '__preview__'; | const TYPE_PREVIEW = '__preview__'; | ||||
const TYPE_HISEC = '__hisec__'; | |||||
private $host; | private $host; | ||||
private $path; | private $path; | ||||
private $requestData; | private $requestData; | ||||
private $user; | private $user; | ||||
private $applicationConfiguration; | private $applicationConfiguration; | ||||
final public function __construct($host, $path) { | final public function __construct($host, $path) { | ||||
▲ Show 20 Lines • Show All 229 Lines • ▼ Show 20 Lines | if (!$valid) { | ||||
implode("\n", $more_info))); | implode("\n", $more_info))); | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
final public function isFormPost() { | final public function isFormPost() { | ||||
$post = $this->getExists(self::TYPE_FORM) && | $post = $this->getExists(self::TYPE_FORM) && | ||||
!$this->getExists(self::TYPE_HISEC) && | |||||
$this->isHTTPPost(); | $this->isHTTPPost(); | ||||
if (!$post) { | if (!$post) { | ||||
return false; | return false; | ||||
} | } | ||||
return $this->validateCSRF(); | return $this->validateCSRF(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 324 Lines • Show Last 20 Lines |