summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework/middleware/security/exceptions
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-07-07 12:03:34 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-07-07 12:03:34 +0200
commit11e834ea74243518b4057f0f5f7cafe6f2761530 (patch)
treef500a6e459a61e9fcaa33114948803a61b4da7b2 /lib/private/appframework/middleware/security/exceptions
parent64a15191e4397da9712d4d17675993a9acdab31e (diff)
parente5645a94ecf6a9e037c8475cb085f14b656b71ac (diff)
downloadnextcloud-server-11e834ea74243518b4057f0f5f7cafe6f2761530.tar.gz
nextcloud-server-11e834ea74243518b4057f0f5f7cafe6f2761530.zip
Merge branch 'stable9' into sync-stable9
Diffstat (limited to 'lib/private/appframework/middleware/security/exceptions')
-rw-r--r--lib/private/appframework/middleware/security/exceptions/strictcookiemissingexception.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/private/appframework/middleware/security/exceptions/strictcookiemissingexception.php b/lib/private/appframework/middleware/security/exceptions/strictcookiemissingexception.php
new file mode 100644
index 00000000000..c45cc400d72
--- /dev/null
+++ b/lib/private/appframework/middleware/security/exceptions/strictcookiemissingexception.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * @author Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\Appframework\Middleware\Security\Exceptions;
+
+use OCP\AppFramework\Http;
+
+/**
+ * Class StrictCookieMissingException is thrown when the strict cookie has not
+ * been sent with the request but is required.
+ *
+ * @package OC\Appframework\Middleware\Security\Exceptions
+ */
+class StrictCookieMissingException extends SecurityException {
+ public function __construct() {
+ parent::__construct('Strict Cookie has not been found in request.', Http::STATUS_PRECONDITION_FAILED);
+ }
+}