diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-10-06 14:18:46 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-10-06 14:18:46 +0200 |
commit | 80a232da6a5470e248979cfde7b1e4e2237b8284 (patch) | |
tree | e62ee54d82c00aa4da11a5716e24ad25c2d939b0 /lib/public/irequest.php | |
parent | 4b31b349b876bef5ef1839add20017b9ad048447 (diff) | |
download | nextcloud-server-80a232da6a5470e248979cfde7b1e4e2237b8284.tar.gz nextcloud-server-80a232da6a5470e248979cfde7b1e4e2237b8284.zip |
Add \OCP\IRequest::getHttpProtocol
Only allow valid HTTP protocols.
Ref https://github.com/owncloud/core/pull/19537#discussion_r41252333 + https://github.com/owncloud/security-tracker/issues/119
Diffstat (limited to 'lib/public/irequest.php')
-rw-r--r-- | lib/public/irequest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public/irequest.php b/lib/public/irequest.php index 20fa543dd69..acfc4f3f1d0 100644 --- a/lib/public/irequest.php +++ b/lib/public/irequest.php @@ -168,6 +168,14 @@ interface IRequest { public function getServerProtocol(); /** + * Returns the used HTTP protocol. + * + * @return string HTTP protocol. HTTP/2, HTTP/1.1 or HTTP/1.0. + * @since 8.2.0 + */ + public function getHttpProtocol(); + + /** * Returns the request uri, even if the website uses one or more * reverse proxies * @return string |