]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Special/Options.php
Security: Use htmlspecialchars() for user input in Arguments class
[friendica.git] / src / Module / Special / Options.php
index 389e7a239de89a1432e104f23d90fe1ad168184f..26a21f0482837748908b63487561a770ee4d61d8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -34,13 +34,9 @@ use Friendica\Module\Response;
  */
 class Options extends BaseModule
 {
-       protected function options(array $request = [])
+       protected function rawContent(array $request = [])
        {
-               $allowedMethods = $this->parameters['AllowedMethods'] ?? [];
-
-               if (empty($allowedMethods)) {
-                       $allowedMethods = Router::ALLOWED_METHODS;
-               }
+               $allowedMethods = $this->parameters['AllowedMethods'] ?? Router::ALLOWED_METHODS;
 
                // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS
                $this->response->setHeader(implode(',', $allowedMethods), 'Allow');