summaryrefslogtreecommitdiffstats
path: root/lib/private/connector
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-04-23 16:33:51 +0200
committerLukas Reschke <lukas@owncloud.com>2015-04-23 16:33:51 +0200
commitab9ea97d3af62fd1c9c1f813b84e5c45a585a8d8 (patch)
tree5af6184755a710fc6642876d1df14734e19d7635 /lib/private/connector
parent21ad4400afdc6806268d1d8c07dd97dacbe99df6 (diff)
downloadnextcloud-server-ab9ea97d3af62fd1c9c1f813b84e5c45a585a8d8.tar.gz
nextcloud-server-ab9ea97d3af62fd1c9c1f813b84e5c45a585a8d8.zip
Catch not existing User-Agent header
In case of an not sent UA header consider the client as valid
Diffstat (limited to 'lib/private/connector')
-rw-r--r--lib/private/connector/sabre/blocklegacyclientplugin.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/blocklegacyclientplugin.php b/lib/private/connector/sabre/blocklegacyclientplugin.php
index 7da6ff563dc..9480cd1f06d 100644
--- a/lib/private/connector/sabre/blocklegacyclientplugin.php
+++ b/lib/private/connector/sabre/blocklegacyclientplugin.php
@@ -46,7 +46,7 @@ class BlockLegacyClientPlugin extends ServerPlugin {
}
/**
- * @param \Sabre\DAV\ $server
+ * @param \Sabre\DAV\Server $server
* @return void
*/
public function initialize(\Sabre\DAV\Server $server) {
@@ -62,6 +62,10 @@ class BlockLegacyClientPlugin extends ServerPlugin {
*/
public function beforeHandler(RequestInterface $request) {
$userAgent = $request->getHeader('User-Agent');
+ if($userAgent === null) {
+ return;
+ }
+
$minimumSupportedDesktopVersion = $this->config->getSystemValue('minimum.supported.desktop.version', '1.7.0');
// Match on the mirall version which is in scheme "Mozilla/5.0 (%1) mirall/%2" or