5 use Laminas\Diactoros\Response\JsonResponse
;
6 use wcf\system\exception\IllegalLinkException
;
9 * Internal action used to run a test for url rewriting.
11 * @author Alexander Ebert
12 * @copyright 2001-2019 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
16 final class CoreRewriteTestAction
extends AbstractAction
18 const AVAILABLE_DURING_OFFLINE_MODE
= true;
23 * @throws IllegalLinkException
25 public function readParameters()
27 parent
::readParameters();
29 if (!isset($_GET['uuidHash']) ||
!\
hash_equals(\
hash('sha256', WCF_UUID
), $_GET['uuidHash'])) {
30 throw new IllegalLinkException();
37 public function execute()
41 return new JsonResponse(
43 'core_rewrite_test' => 'passed',
47 'access-control-allow-origin' => '*',