CrossSiteRequestForgeryException.php 622 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OC\AppFramework\Middleware\Security\Exceptions;
  8. use OCP\AppFramework\Http;
  9. /**
  10. * Class CrossSiteRequestForgeryException is thrown when a CSRF exception has
  11. * been encountered.
  12. *
  13. * @package OC\AppFramework\Middleware\Security\Exceptions
  14. */
  15. class CrossSiteRequestForgeryException extends SecurityException {
  16. public function __construct() {
  17. parent::__construct('CSRF check failed', Http::STATUS_PRECONDITION_FAILED);
  18. }
  19. }