diff --git a/.mailmap b/.mailmap
index b96269235cf4f4a9a50e5ea0254c4d4063d940c8..41d9ad6e582ebe408e1b8445bd00d03592cee4e9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -182,7 +182,8 @@ Jesús Macias <jmacias@solidgear.es> Jesus Macias <jmacias@full-on-net.com>
 jknockaert <jasper@knockaert.nl>
 Joan <aseques@gmail.com>
 Joar Wandborg <git@wandborg.com>
-Joas Schilling <nickvergessen@owncloud.com> Joas Schilling <nickvergessen@gmx.de>
+Joas Schilling <coding@schilljs.com> Joas Schilling <nickvergessen@gmx.de>
+Joas Schilling <coding@schilljs.com> Joas Schilling <nickvergessen@owncloud.com>
 joel hansson <joel.hansson@gmail.com>
 Johan Björk <johanimon@gmail.com>
 Johannes Twittmann <github.com@deryo.de>
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index ce4940829761d2615a7767d5927e318a9a93700b..565ad0ec663a9712fbf30ea4b6c4a44c0845e700 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -1079,22 +1079,27 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
 			'lastmodified' => time(),
 		];
 
-		foreach($this->subscriptionPropertyMap as $xmlName=>$dbName) {
-			if (isset($properties[$xmlName])) {
+		$propertiesBoolean = ['striptodos', 'stripalarms', 'stripattachments'];
 
-				$values[$dbName] = $properties[$xmlName];
-				$fieldNames[] = $dbName;
+		foreach($this->subscriptionPropertyMap as $xmlName=>$dbName) {
+			if (array_key_exists($xmlName, $properties)) {
+					$values[$dbName] = $properties[$xmlName];
+					if (in_array($dbName, $propertiesBoolean)) {
+						$values[$dbName] = true;
+				}
 			}
 		}
 
+		$valuesToInsert = array();
+
 		$query = $this->db->getQueryBuilder();
+
+		foreach (array_keys($values) as $name) {
+			$valuesToInsert[$name] = $query->createNamedParameter($values[$name]);
+		}
+
 		$query->insert('calendarsubscriptions')
-			->values([
-				'principaluri' => $query->createNamedParameter($values['principaluri']),
-				'uri'          => $query->createNamedParameter($values['uri']),
-				'source'       => $query->createNamedParameter($values['source']),
-				'lastmodified' => $query->createNamedParameter($values['lastmodified']),
-			])
+			->values($valuesToInsert)
 			->execute();
 
 		return $this->db->lastInsertId('*PREFIX*calendarsubscriptions');
diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
index 977bdf15c8e3b06d5ccee6d70df2ecf8ca609ee2..baa8540c43cf383e5ca40d62cb49c302942c3012 100644
--- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
@@ -333,15 +333,20 @@ EOD;
 
 	public function testSubscriptions() {
 		$id = $this->backend->createSubscription(self::UNIT_TEST_USER, 'Subscription', [
-			'{http://calendarserver.org/ns/}source' => new Href('test-source')
+			'{http://calendarserver.org/ns/}source' => new Href('test-source'),
+			'{http://apple.com/ns/ical/}calendar-color' => '#1C4587',
+			'{http://calendarserver.org/ns/}subscribed-strip-todos' => ''
 		]);
 
 		$subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER);
 		$this->assertEquals(1, count($subscriptions));
+		$this->assertEquals('#1C4587', $subscriptions[0]['{http://apple.com/ns/ical/}calendar-color']);
+		$this->assertEquals(true, $subscriptions[0]['{http://calendarserver.org/ns/}subscribed-strip-todos']);
 		$this->assertEquals($id, $subscriptions[0]['id']);
 
 		$patch = new PropPatch([
 				'{DAV:}displayname' => 'Unit test',
+				'{http://apple.com/ns/ical/}calendar-color' => '#ac0606',
 		]);
 		$this->backend->updateSubscription($id, $patch);
 		$patch->commit();
@@ -350,6 +355,7 @@ EOD;
 		$this->assertEquals(1, count($subscriptions));
 		$this->assertEquals($id, $subscriptions[0]['id']);
 		$this->assertEquals('Unit test', $subscriptions[0]['{DAV:}displayname']);
+		$this->assertEquals('#ac0606', $subscriptions[0]['{http://apple.com/ns/ical/}calendar-color']);
 
 		$this->backend->deleteSubscription($id);
 		$subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER);
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index 40e2e8a472f9d2e6950cbc9640cfd2041196e7c2..1ea31f2dbc038f839333cdb5cdb66770e7e2919e 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -217,28 +217,32 @@ class FederatedShareProvider implements IShareProvider {
 			$share->getPermissions(),
 			$token
 		);
-		$sharedByFederatedId = $share->getSharedBy();
-		if ($this->userManager->userExists($sharedByFederatedId)) {
-			$sharedByFederatedId = $sharedByFederatedId . '@' . $this->addressHandler->generateRemoteURL();
-		}
-		$send = $this->notifications->sendRemoteShare(
-			$token,
-			$share->getSharedWith(),
-			$share->getNode()->getName(),
-			$shareId,
-			$share->getShareOwner(),
-			$share->getShareOwner() . '@' . $this->addressHandler->generateRemoteURL(),
-			$share->getSharedBy(),
-			$sharedByFederatedId
-		);
 
-		if ($send === false) {
-			$data = $this->getRawShare($shareId);
-			$share = $this->createShareObject($data);
-			$this->removeShareFromTable($share);
-			$message_t = $this->l->t('Sharing %s failed, could not find %s, maybe the server is currently unreachable.',
-				[$share->getNode()->getName(), $share->getSharedWith()]);
-			throw new \Exception($message_t);
+		try {
+			$sharedByFederatedId = $share->getSharedBy();
+			if ($this->userManager->userExists($sharedByFederatedId)) {
+				$sharedByFederatedId = $sharedByFederatedId . '@' . $this->addressHandler->generateRemoteURL();
+			}
+			$send = $this->notifications->sendRemoteShare(
+				$token,
+				$share->getSharedWith(),
+				$share->getNode()->getName(),
+				$shareId,
+				$share->getShareOwner(),
+				$share->getShareOwner() . '@' . $this->addressHandler->generateRemoteURL(),
+				$share->getSharedBy(),
+				$sharedByFederatedId
+			);
+
+			if ($send === false) {
+				$message_t = $this->l->t('Sharing %s failed, could not find %s, maybe the server is currently unreachable.',
+					[$share->getNode()->getName(), $share->getSharedWith()]);
+				throw new \Exception($message_t);
+			}
+		} catch (\Exception $e) {
+			$this->logger->error('Failed to notify remote server of federated share, removing share (' . $e->getMessage() . ')');
+			$this->removeShareFromTableById($shareId);
+			throw $e;
 		}
 
 		return $shareId;
@@ -526,13 +530,22 @@ class FederatedShareProvider implements IShareProvider {
 	 * @param IShare $share
 	 */
 	public function removeShareFromTable(IShare $share) {
+		$this->removeShareFromTableById($share->getId());
+	}
+
+	/**
+	 * remove share from table
+	 *
+	 * @param string $shareId
+	 */
+	private function removeShareFromTableById($shareId) {
 		$qb = $this->dbConnection->getQueryBuilder();
 		$qb->delete('share')
-			->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId())));
+			->where($qb->expr()->eq('id', $qb->createNamedParameter($shareId)));
 		$qb->execute();
 
 		$qb->delete('federated_reshares')
-			->where($qb->expr()->eq('share_id', $qb->createNamedParameter($share->getId())));
+			->where($qb->expr()->eq('share_id', $qb->createNamedParameter($shareId)));
 		$qb->execute();
 	}
 
diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
index 6792e534cc6ef18f252f4242f265bbdcc11c25b0..8c5efdab7b00efb2a244255d05f07e3a54e521c2 100644
--- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
+++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
@@ -217,10 +217,6 @@ class FederatedShareProviderTest extends \Test\TestCase {
 				'sharedBy@http://localhost/'
 			)->willReturn(false);
 
-		$this->rootFolder->expects($this->once())
-			->method('getUserFolder')
-			->with('shareOwner')
-			->will($this->returnSelf());
 		$this->rootFolder->method('getById')
 			->with('42')
 			->willReturn([$node]);
@@ -244,6 +240,62 @@ class FederatedShareProviderTest extends \Test\TestCase {
 		$this->assertFalse($data);
 	}
 
+	public function testCreateException() {
+		$share = $this->shareManager->newShare();
+
+		$node = $this->getMock('\OCP\Files\File');
+		$node->method('getId')->willReturn(42);
+		$node->method('getName')->willReturn('myFile');
+
+		$share->setSharedWith('user@server.com')
+			->setSharedBy('sharedBy')
+			->setShareOwner('shareOwner')
+			->setPermissions(19)
+			->setNode($node);
+
+		$this->tokenHandler->method('generateToken')->willReturn('token');
+
+		$this->addressHandler->expects($this->any())->method('generateRemoteURL')
+			->willReturn('http://localhost/');
+		$this->addressHandler->expects($this->any())->method('splitUserRemote')
+			->willReturn(['user', 'server.com']);
+
+		$this->notifications->expects($this->once())
+			->method('sendRemoteShare')
+			->with(
+				$this->equalTo('token'),
+				$this->equalTo('user@server.com'),
+				$this->equalTo('myFile'),
+				$this->anything(),
+				'shareOwner',
+				'shareOwner@http://localhost/',
+				'sharedBy',
+				'sharedBy@http://localhost/'
+			)->willThrowException(new \Exception('dummy'));
+
+		$this->rootFolder->method('getById')
+			->with('42')
+			->willReturn([$node]);
+
+		try {
+			$share = $this->provider->create($share);
+			$this->fail();
+		} catch (\Exception $e) {
+			$this->assertEquals('dummy', $e->getMessage());
+		}
+
+		$qb = $this->connection->getQueryBuilder();
+		$stmt = $qb->select('*')
+			->from('share')
+			->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId())))
+			->execute();
+
+		$data = $stmt->fetch();
+		$stmt->closeCursor();
+
+		$this->assertFalse($data);
+	}
+
 	public function testCreateShareWithSelf() {
 		$share = $this->shareManager->newShare();
 
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 24a6f4ec6e269c02afafbdb3913f840e04e9d9e8..f0b16a5788680d60a1371ab9a1c79a69b760804a 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -513,7 +513,7 @@
 		 * Event handler for when the URL changed
 		 */
 		_onUrlChanged: function(e) {
-			if (e && e.dir) {
+			if (e && _.isString(e.dir)) {
 				this.changeDirectory(e.dir, false, true);
 			}
 		},
@@ -1397,6 +1397,16 @@
 			return OC.linkTo('files', 'index.php')+"?dir="+ encodeURIComponent(dir).replace(/%2F/g, '/');
 		},
 
+		_isValidPath: function(path) {
+			var sections = path.split('/');
+			for (var i = 0; i < sections.length; i++) {
+				if (sections[i] === '..') {
+					return false;
+				}
+			}
+			return true;
+		},
+
 		/**
 		 * Sets the current directory name and updates the breadcrumb.
 		 * @param targetDir directory to display
@@ -1404,7 +1414,11 @@
 		 * @param {string} [fileId] file id
 		 */
 		_setCurrentDir: function(targetDir, changeUrl, fileId) {
-			targetDir = targetDir.replace(/\\/g, '/').replace(/\/\.\.\//g, '/');
+			targetDir = targetDir.replace(/\\/g, '/');
+			if (!this._isValidPath(targetDir)) {
+				targetDir = '/';
+				changeUrl = true;
+			}
 			var previousDir = this.getCurrentDirectory(),
 				baseDir = OC.basename(targetDir);
 
@@ -1415,6 +1429,9 @@
 				this.setPageTitle();
 			}
 
+			if (targetDir.length > 0 && targetDir[0] !== '/') {
+				targetDir = '/' + targetDir;
+			}
 			this._currentDirectory = targetDir;
 
 			// legacy stuff
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index 453f1cafcafcd03c03c0d936b75a846457cda161..98511fd3d64de0695f1ffce4ffea75a89b488453 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -1334,13 +1334,32 @@ describe('OCA.Files.FileList tests', function() {
 			fileList.changeDirectory('/another\\subdir');
 			expect(fileList.getCurrentDirectory()).toEqual('/another/subdir');
 		});
-		it('converts backslashes to slashes and removes traversals when calling changeDirectory()', function() {
-			fileList.changeDirectory('/another\\subdir/../foo\\../bar\\..\\file/..\\folder/../');
-			expect(fileList.getCurrentDirectory()).toEqual('/another/subdir/foo/bar/file/folder/');
+		it('switches to root dir when current directory is invalid', function() {
+			_.each([
+				'..',
+				'/..',
+				'../',
+				'/../',
+				'/../abc',
+				'/abc/..',
+				'/abc/../',
+				'/../abc/',
+				'/another\\subdir/../foo\\../bar\\..\\file/..\\folder/../'
+			], function(path) {
+				fileList.changeDirectory(path);
+				expect(fileList.getCurrentDirectory()).toEqual('/');
+			});
 		});
-		it('does not convert folders with a ".." in the name', function() {
-			fileList.changeDirectory('/abc../def');
-			expect(fileList.getCurrentDirectory()).toEqual('/abc../def');
+		it('allows paths with dotdot at the beginning or end', function() {
+			_.each([
+				'/..abc',
+				'/def..',
+				'/...',
+				'/abc../def'
+			], function(path) {
+				fileList.changeDirectory(path);
+				expect(fileList.getCurrentDirectory()).toEqual(path);
+			});
 		});
 		it('switches to root dir when current directory does not exist', function() {
 			fileList.changeDirectory('/unexist');
@@ -1404,6 +1423,12 @@ describe('OCA.Files.FileList tests', function() {
 			setDirSpy.restore();
 			getFolderContentsStub.restore();
 		});
+		it('prepends a slash to directory if none was given', function() {
+			fileList.changeDirectory('');
+			expect(fileList.getCurrentDirectory()).toEqual('/');
+			fileList.changeDirectory('noslash');
+			expect(fileList.getCurrentDirectory()).toEqual('/noslash');
+		});
 	});
 	describe('breadcrumb events', function() {
 		var deferredList;
diff --git a/apps/files_external/lib/Command/Backends.php b/apps/files_external/lib/Command/Backends.php
index 260ea210397eda76197c549d420ffcee5d537c4c..d1da6db3f6a6efe8261c32add5e7768eec1c8cef 100644
--- a/apps/files_external/lib/Command/Backends.php
+++ b/apps/files_external/lib/Command/Backends.php
@@ -98,15 +98,30 @@ class Backends extends Base {
 		$result = [
 			'name' => $data['name'],
 			'identifier' => $data['identifier'],
-			'configuration' => array_map(function (DefinitionParameter $parameter) {
-				return $parameter->getTypeName();
-			}, $data['configuration'])
+			'configuration' => $this->formatConfiguration($data['configuration'])
 		];
 		if ($backend instanceof Backend) {
 			$result['storage_class'] = $backend->getStorageClass();
 			$authBackends = $this->backendService->getAuthMechanismsByScheme(array_keys($backend->getAuthSchemes()));
 			$result['supported_authentication_backends'] = array_keys($authBackends);
+			$authConfig = array_map(function (AuthMechanism $auth) {
+				return $this->serializeAuthBackend($auth)['configuration'];
+			}, $authBackends);
+			$result['authentication_configuration'] = array_combine(array_keys($authBackends), $authConfig);
 		}
 		return $result;
 	}
+
+	/**
+	 * @param DefinitionParameter[] $parameters
+	 * @return string[]
+	 */
+	private function formatConfiguration(array $parameters) {
+		$configuration = array_filter($parameters, function (DefinitionParameter $parameter) {
+			return $parameter->getType() !== DefinitionParameter::VALUE_HIDDEN;
+		});
+		return array_map(function (DefinitionParameter $parameter) {
+			return $parameter->getTypeName();
+		}, $configuration);
+	}
 }
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index da0f957ed99b86c779014a433872fdfaf8672620..dccd6027b02d65eaafcbe4308a2cd63788bf0299 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -79,6 +79,42 @@
 				var permission = parseInt($tr.attr('data-permissions')) | OC.PERMISSION_DELETE;
 				$tr.attr('data-permissions', permission);
 			}
+
+			// add row with expiration date for link only shares - influenced by _createRow of filelist
+			if (this._linksOnly) {
+				var expirationTimestamp = 0;
+				if(fileData.shares[0].expiration !== null) {
+					expirationTimestamp = moment(fileData.shares[0].expiration).valueOf();
+				}
+				$tr.attr('data-expiration', expirationTimestamp);
+
+				// date column (1000 milliseconds to seconds, 60 seconds, 60 minutes, 24 hours)
+				// difference in days multiplied by 5 - brightest shade for expiry dates in more than 32 days (160/5)
+				var modifiedColor = Math.round((expirationTimestamp - (new Date()).getTime()) / 1000 / 60 / 60 / 24 * 5);
+				// ensure that the brightest color is still readable
+				if (modifiedColor >= 160) {
+					modifiedColor = 160;
+				}
+
+				if (expirationTimestamp > 0) {
+					formatted = OC.Util.formatDate(expirationTimestamp);
+					text = OC.Util.relativeModifiedDate(expirationTimestamp);
+				} else {
+					formatted = t('files_sharing', 'No expiration date set');
+					text = '';
+					modifiedColor = 160;
+				}
+				td = $('<td></td>').attr({"class": "date"});
+				td.append($('<span></span>').attr({
+						"class": "modified",
+						"title": formatted,
+						"style": 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'
+					}).text(text)
+						.tooltip({placement: 'top'})
+				);
+
+				$tr.append(td);
+			}
 			return $tr;
 		},
 
@@ -98,6 +134,11 @@
 				// root has special permissions
 				this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty);
 				this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty);
+
+				// hide expiration date header for non link only shares
+				if (!this._linksOnly) {
+					this.$el.find('th.column-expiration').addClass('hidden');
+				}
 			}
 			else {
 				OCA.Files.FileList.prototype.updateEmptyContent.apply(this, arguments);
@@ -249,6 +290,7 @@
 						type: share.share_type,
 						target: share.share_with,
 						stime: share.stime * 1000,
+						expiration: share.expiration,
 					};
 					if (self._sharedWithUser) {
 						file.shareOwner = share.displayname_owner;
diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php
index fa0365c749c426e2ebd86fe40bd179044bf12277..f59cb7653d888fa5392c55ea82c498a3afd142e4 100644
--- a/apps/files_sharing/templates/list.php
+++ b/apps/files_sharing/templates/list.php
@@ -22,6 +22,9 @@
 			<th id="headerDate" class="hidden column-mtime">
 				<a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Share time' )); ?></span><span class="sort-indicator"></span></a>
 			</th>
+			<th class="hidden column-expiration">
+				<a class="columntitle"><span><?php p($l->t( 'Expiration date' )); ?></span></a>
+			</th>
 		</tr>
 	</thead>
 	<tbody id="fileList">
diff --git a/apps/files_sharing/tests/MountProviderTest.php b/apps/files_sharing/tests/MountProviderTest.php
index f69098cde7b0122ee48430bf1cd04720e5bad409..90d9f0a8567ebcf5c0535ae481f957d887ce7f6b 100644
--- a/apps/files_sharing/tests/MountProviderTest.php
+++ b/apps/files_sharing/tests/MountProviderTest.php
@@ -30,6 +30,9 @@ use OCP\Share\IShare;
 use OCP\Share\IManager;
 use OCP\Files\Mount\IMountPoint;
 
+/**
+ * @group DB
+ */
 class MountProviderTest extends \Test\TestCase {
 
 	/** @var MountProvider */
diff --git a/apps/files_sharing/tests/js/sharedfilelistSpec.js b/apps/files_sharing/tests/js/sharedfilelistSpec.js
index 0b0676a19e6380e71ea7bbd620ca807998a49afc..f177b61c78a0466ae7e832639fc527b7705facc6 100644
--- a/apps/files_sharing/tests/js/sharedfilelistSpec.js
+++ b/apps/files_sharing/tests/js/sharedfilelistSpec.js
@@ -38,6 +38,9 @@ describe('OCA.Sharing.FileList tests', function() {
 			'<th class="hidden column-mtime">' +
 			'<a class="columntitle" data-sort="mtime"><span class="sort-indicator"></span></a>' +
 			'</th>' +
+			'<th class="column-expiration">' +
+			'<a class="columntitle"><span>Expiration date</span></a>' +
+			'</th>' +
 			'</tr></thead>' +
 			'<tbody id="fileList"></tbody>' +
 			'<tfoot></tfoot>' +
@@ -512,6 +515,9 @@ describe('OCA.Sharing.FileList tests', function() {
 
 			fileList.reload();
 
+			var expirationDateInADay = moment()
+				.add(1, 'days').format('YYYY-MM-DD HH:mm:ss');
+
 			/* jshint camelcase: false */
 			ocsResponse = {
 				ocs: {
@@ -528,12 +534,28 @@ describe('OCA.Sharing.FileList tests', function() {
 						path: '/local path/local name.txt',
 						permissions: 1,
 						stime: 11111,
+						expiration: null,
 						share_type: OC.Share.SHARE_TYPE_LINK,
 						share_with: null,
 						token: 'abc',
 						mimetype: 'text/plain',
 						uid_owner: 'user1',
 						displayname_owner: 'User One'
+					},{
+						id: 8,
+						item_type: 'file',
+						item_source: 50,
+						file_source: 50,
+						path: '/local path2/local name2.txt',
+						permissions: 1,
+						stime: 11112,
+						expiration: expirationDateInADay,
+						share_type: OC.Share.SHARE_TYPE_LINK,
+						share_with: null,
+						token: 'abcd',
+						mimetype: 'text/plain2',
+						uid_owner: 'user2',
+						displayname_owner: 'User One2'
 					}]
 				}
 			};
@@ -570,10 +592,10 @@ describe('OCA.Sharing.FileList tests', function() {
 				JSON.stringify(ocsResponse)
 			);
 
-			// only renders the link share entry
+			// only renders the link share entries
 			var $rows = fileList.$el.find('tbody tr');
 			var $tr = $rows.eq(0);
-			expect($rows.length).toEqual(1);
+			expect($rows.length).toEqual(2);
 			expect($tr.attr('data-id')).toEqual('49');
 			expect($tr.attr('data-type')).toEqual('file');
 			expect($tr.attr('data-file')).toEqual('local name.txt');
@@ -588,8 +610,17 @@ describe('OCA.Sharing.FileList tests', function() {
 			expect($tr.find('a.name').attr('href')).toEqual(
 				OC.webroot + '/remote.php/webdav/local%20path/local%20name.txt'
 			);
+			expect($tr.attr('data-expiration')).toEqual('0');
+			expect($tr.find('td:last-child span').text()).toEqual('');
 
 			expect($tr.find('.nametext').text().trim()).toEqual('local name.txt');
+
+			// change to next row
+			$tr = $rows.eq(1);
+			expect($tr.attr('data-id')).toEqual('50');
+			expect($tr.attr('data-file')).toEqual('local name2.txt');
+			expect($tr.attr('data-expiration')).not.toEqual('0');
+			expect($tr.find('td:last-child span').text()).toEqual('in a day');
 		});
 		it('does not show virtual token recipient as recipient when password was set', function() {
 			/* jshint camelcase: false */
@@ -613,7 +644,7 @@ describe('OCA.Sharing.FileList tests', function() {
 			// only renders the link share entry
 			var $rows = fileList.$el.find('tbody tr');
 			var $tr = $rows.eq(0);
-			expect($rows.length).toEqual(1);
+			expect($rows.length).toEqual(2);
 			expect($tr.attr('data-id')).toEqual('49');
 			expect($tr.attr('data-type')).toEqual('file');
 			expect($tr.attr('data-file')).toEqual('local name.txt');
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index f0cd9d6531052cf0d2978271bfea2f8c17d4672c..cd4830d5469660d74084c41db1a311619a765e57 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -645,7 +645,7 @@ class Storage {
 						//distance between two version too small, mark to delete
 						$toDelete[$key] = $version['path'] . '.v' . $version['version'];
 						$size += $version['size'];
-						\OCP\Util::writeLog('files_versions', 'Mark to expire '. $version['path'] .' next version should be ' . $nextVersion . " or smaller. (prevTimestamp: " . $prevTimestamp . "; step: " . $step, \OCP\Util::DEBUG);
+						\OCP\Util::writeLog('files_versions', 'Mark to expire '. $version['path'] .' next version should be ' . $nextVersion . " or smaller. (prevTimestamp: " . $prevTimestamp . "; step: " . $step, \OCP\Util::INFO);
 					} else {
 						$nextVersion = $version['version'] - $step;
 						$prevTimestamp = $version['version'];
@@ -766,7 +766,7 @@ class Storage {
 				self::deleteVersion($versionsFileview, $path);
 				\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $path, 'trigger' => self::DELETE_TRIGGER_QUOTA_EXCEEDED));
 				unset($allVersions[$key]); // update array with the versions we keep
-				\OCP\Util::writeLog('files_versions', "Expire: " . $path, \OCP\Util::DEBUG);
+				\OCP\Util::writeLog('files_versions', "Expire: " . $path, \OCP\Util::INFO);
 			}
 
 			// Check if enough space is available after versions are rearranged.
@@ -782,7 +782,7 @@ class Storage {
 				\OC_Hook::emit('\OCP\Versions', 'preDelete', array('path' => $version['path'].'.v'.$version['version'], 'trigger' => self::DELETE_TRIGGER_QUOTA_EXCEEDED));
 				self::deleteVersion($versionsFileview, $version['path'] . '.v' . $version['version']);
 				\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $version['path'].'.v'.$version['version'], 'trigger' => self::DELETE_TRIGGER_QUOTA_EXCEEDED));
-				\OCP\Util::writeLog('files_versions', 'running out of space! Delete oldest version: ' . $version['path'].'.v'.$version['version'] , \OCP\Util::DEBUG);
+				\OCP\Util::writeLog('files_versions', 'running out of space! Delete oldest version: ' . $version['path'].'.v'.$version['version'] , \OCP\Util::INFO);
 				$versionsSize -= $version['size'];
 				$availableSpace += $version['size'];
 				next($allVersions);
diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php
index 55d7ac8a81c8dbbcecb6019739e1b3c830d6c5e6..767a2351aebf3a06627d1e595d03f6a01c6cca47 100644
--- a/apps/user_ldap/lib/User/Manager.php
+++ b/apps/user_ldap/lib/User/Manager.php
@@ -25,6 +25,7 @@
 
 namespace OCA\User_LDAP\User;
 
+use OC\Cache\CappedMemoryCache;
 use OCA\User_LDAP\LogWrapper;
 use OCA\User_LDAP\FilesystemHelper;
 use OCP\IAvatarManager;
@@ -62,14 +63,13 @@ class Manager {
 	protected $avatarManager;
 
 	/**
-	 * array['byDN']	\OCA\User_LDAP\User\User[]
-	 * 	['byUid']	\OCA\User_LDAP\User\User[]
-	 * @var array $users
+	 * @var CappedMemoryCache $usersByDN
 	 */
-	protected $users = array(
-		'byDN'  => array(),
-		'byUid' => array(),
-	);
+	protected $usersByDN;
+	/**
+	 * @var CappedMemoryCache $usersByUid
+	 */
+	protected $usersByUid;
 
 	/**
 	 * @param IConfig $ocConfig
@@ -93,6 +93,8 @@ class Manager {
 		$this->image         = $image;
 		$this->db            = $db;
 		$this->userManager   = $userManager;
+		$this->usersByDN     = new CappedMemoryCache();
+		$this->usersByUid    = new CappedMemoryCache();
 	}
 
 	/**
@@ -116,8 +118,8 @@ class Manager {
 		$user = new User($uid, $dn, $this->access, $this->ocConfig,
 			$this->ocFilesystem, clone $this->image, $this->ocLog,
 			$this->avatarManager, $this->userManager);
-		$this->users['byDN'][$dn]   = $user;
-		$this->users['byUid'][$uid] = $user;
+		$this->usersByDN[$dn]   = $user;
+		$this->usersByUid[$uid] = $user;
 		return $user;
 	}
 
@@ -219,10 +221,10 @@ class Manager {
 	 */
 	public function get($id) {
 		$this->checkAccess();
-		if(isset($this->users['byDN'][$id])) {
-			return $this->users['byDN'][$id];
-		} else if(isset($this->users['byUid'][$id])) {
-			return $this->users['byUid'][$id];
+		if(isset($this->usersByDN[$id])) {
+			return $this->usersByDN[$id];
+		} else if(isset($this->usersByUid[$id])) {
+			return $this->usersByUid[$id];
 		}
 
 		if($this->access->stringResemblesDN($id) ) {
diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php
index 230c82a304559b5574b3c6818f395517a6a2fb90..7929394893b2573c53545b98ab2bea9177d4a18d 100644
--- a/apps/user_ldap/lib/User_LDAP.php
+++ b/apps/user_ldap/lib/User_LDAP.php
@@ -228,6 +228,10 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
 					return false;
 				}
 				$newDn = $this->access->getUserDnByUuid($uuid);
+				//check if renamed user is still valid by reapplying the ldap filter
+				if(!is_array($this->access->readAttribute($newDn, '', $this->access->connection->ldapUserFilter))) {
+					return false;
+				}
 				$this->access->getUserMapper()->setDNbyUUID($newDn, $uuid);
 				return true;
 			} catch (\Exception $e) {
diff --git a/apps/user_ldap/templates/part.settingcontrols.php b/apps/user_ldap/templates/part.settingcontrols.php
index 4dc57eae6d204e4f17fd3bbc5946ff69b22fb019..3f7a53dd4dc28a6bafbb850bffe75f99efe90ae7 100644
--- a/apps/user_ldap/templates/part.settingcontrols.php
+++ b/apps/user_ldap/templates/part.settingcontrols.php
@@ -4,7 +4,7 @@
 	</button>
 	<a href="<?php p(link_to_docs('admin-ldap')); ?>"
 		target="_blank" rel="noreferrer">
-		<img src="<?php print_unescaped(image_path('', 'actions/info.png')); ?>"
+		<img src="<?php print_unescaped(image_path('', 'actions/info.svg')); ?>"
 			style="height:1.75ex" />
 		<?php p($l->t('Help'));?>
 	</a>
diff --git a/apps/user_ldap/templates/part.wizardcontrols.php b/apps/user_ldap/templates/part.wizardcontrols.php
index 4760aa0d8ef0fb93c36895cfaabee154ef03fa4f..2df1fd8d83f63375a5fbb79a096d96534a871810 100644
--- a/apps/user_ldap/templates/part.wizardcontrols.php
+++ b/apps/user_ldap/templates/part.wizardcontrols.php
@@ -10,7 +10,7 @@
 	</button>
 	<a href="<?php p(link_to_docs('admin-ldap')); ?>"
 		target="_blank" rel="noreferrer">
-		<img src="<?php print_unescaped(image_path('', 'actions/info.png')); ?>"
+		<img src="<?php print_unescaped(image_path('', 'actions/info.svg')); ?>"
 			style="height:1.75ex" />
 		<span class="ldap_grey"><?php p($l->t('Help'));?></span>
 	</a>
diff --git a/build/integration/features/sharing-v1.feature b/build/integration/features/sharing-v1.feature
index 3878e741f60e2abbef3b4c456faf9047156b70ea..18dc3447594f6048a80ecf0bbc1887782feb3a0b 100644
--- a/build/integration/features/sharing-v1.feature
+++ b/build/integration/features/sharing-v1.feature
@@ -26,6 +26,21 @@ Feature: sharing
     Then the OCS status code should be "100"
     And the HTTP status code should be "200"
 
+  Scenario: Creating a new share with user who already received a share through their group
+    Given As an "admin"
+    And user "user0" exists
+    And user "user1" exists
+    And group "sharing-group" exists
+    And user "user1" belongs to group "sharing-group"
+    And file "welcome.txt" of user "user0" is shared with group "sharing-group"
+    And As an "user0"
+    Then sending "POST" to "/apps/files_sharing/api/v1/shares" with
+      | path | welcome.txt |
+      | shareWith | user1 |
+      | shareType | 0 |
+    Then the OCS status code should be "100"
+    And the HTTP status code should be "200"
+
   Scenario: Creating a new public share
     Given user "user0" exists
     And As an "user0"
diff --git a/core/Application.php b/core/Application.php
index 8ea2672e54ea817bc39dd8a1cd224c1190742c32..a87917b626a2c5a96367da275d0d56143ae0f71f 100644
--- a/core/Application.php
+++ b/core/Application.php
@@ -32,7 +32,6 @@ use OC\AppFramework\Utility\TimeFactory;
 use OC\Core\Controller\AvatarController;
 use OC\Core\Controller\LoginController;
 use OC\Core\Controller\LostController;
-use OC\Core\Controller\OccController;
 use OC\Core\Controller\TokenController;
 use OC\Core\Controller\TwoFactorChallengeController;
 use OC\Core\Controller\UserController;
@@ -126,18 +125,6 @@ class Application extends App {
 				$c->query('SecureRandom')
 			);
 		});
-		$container->registerService('OccController', function(SimpleContainer $c) {
-			return new OccController(
-				$c->query('AppName'),
-				$c->query('Request'),
-				$c->query('Config'),
-				new \OC\Console\Application(
-					$c->query('Config'),
-					$c->query('ServerContainer')->getEventDispatcher(),
-					$c->query('Request')
-				)
-			);
-		});
 
 		/**
 		 * Core class wrappers
diff --git a/core/Controller/OccController.php b/core/Controller/OccController.php
deleted file mode 100644
index 917d02f37f19c785a5fba810490ee1cc8c9e4b94..0000000000000000000000000000000000000000
--- a/core/Controller/OccController.php
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-/**
- * @author Victor Dubiniuk <dubiniuk@owncloud.com>
- *
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OC\Core\Controller;
-
-use OCP\AppFramework\Controller;
-use OCP\AppFramework\Http\JSONResponse;
-use OC\Console\Application;
-use OCP\IConfig;
-use OCP\IRequest;
-use Symfony\Component\Console\Input\ArrayInput;
-use Symfony\Component\Console\Output\BufferedOutput;
-
-class OccController extends Controller {
-	
-	/** @var array  */
-	private $allowedCommands = [
-		'app:disable',
-		'app:enable',
-		'app:getpath',
-		'app:list',
-		'check',
-		'config:list',
-		'maintenance:mode',
-		'status',
-		'upgrade'
-	];
-
-	/** @var IConfig */
-	private $config;
-	/** @var Application */
-	private $console;
-
-	/**
-	 * OccController constructor.
-	 *
-	 * @param string $appName
-	 * @param IRequest $request
-	 * @param IConfig $config
-	 * @param Application $console
-	 */
-	public function __construct($appName, IRequest $request,
-								IConfig $config, Application $console) {
-		parent::__construct($appName, $request);
-		$this->config = $config;
-		$this->console = $console;
-	}
-
-	/**
-	 * @PublicPage
-	 * @NoCSRFRequired
-	 *
-	 * Execute occ command
-	 * Sample request
-	 *	POST http://domain.tld/index.php/occ/status',
-	 * 		{
-	 *			'params': {
-	 * 					'--no-warnings':'1',
-	 *		 			'--output':'json'
-	 * 			},
-	 * 			'token': 'someToken'
-	 * 		}
-	 *
-	 * @param string $command
-	 * @param string $token
-	 * @param array $params
-	 *
-	 * @return JSONResponse
-	 * @throws \Exception
-	 */
-	public function execute($command, $token, $params = []) {
-		try {
-			$this->validateRequest($command, $token);
-
-			$output = new BufferedOutput();
-			$formatter = $output->getFormatter();
-			$formatter->setDecorated(false);
-			$this->console->setAutoExit(false);
-			$this->console->loadCommands(new ArrayInput([]), $output);
-
-			$inputArray = array_merge(['command' => $command], $params);
-			$input = new ArrayInput($inputArray);
-
-			$exitCode = $this->console->run($input, $output);
-			$response = $output->fetch();
-
-			$json = [
-				'exitCode' => $exitCode,
-				'response' => $response
-			];
-
-		} catch (\UnexpectedValueException $e){
-			$json = [
-				'exitCode' => 126,
-				'response' => 'Not allowed',
-				'details' => $e->getMessage()
-			];
-		}
-		return new JSONResponse($json);
-	}
-
-	/**
-	 * Check if command is allowed and has a valid security token
-	 * @param $command
-	 * @param $token
-	 */
-	protected function validateRequest($command, $token){
-		if (!in_array($this->request->getRemoteAddress(), ['::1', '127.0.0.1', 'localhost'])) {
-			throw new \UnexpectedValueException('Web executor is not allowed to run from a different host');
-		}
-
-		if (!in_array($command, $this->allowedCommands)) {
-			throw new \UnexpectedValueException(sprintf('Command "%s" is not allowed to run via web request', $command));
-		}
-
-		$coreToken = $this->config->getSystemValue('updater.secret', '');
-		if ($coreToken === '') {
-			throw new \UnexpectedValueException(
-				'updater.secret is undefined in config/config.php. Either browse the admin settings in your ownCloud and click "Open updater" or define a strong secret using <pre>php -r \'echo password_hash("MyStrongSecretDoUseYourOwn!", PASSWORD_DEFAULT)."\n";\'</pre> and set this in the config.php.'
-			);
-		}
-
-		if (!password_verify($token, $coreToken)) {
-			throw new \UnexpectedValueException(
-				'updater.secret does not match the provided token'
-			);
-		}
-	}
-}
diff --git a/core/img/actions/add.png b/core/img/actions/add.png
deleted file mode 100644
index 8ae17cfe11b4365254e1acbc1c0ade0793f25bef..0000000000000000000000000000000000000000
Binary files a/core/img/actions/add.png and /dev/null differ
diff --git a/core/img/actions/caret-dark.png b/core/img/actions/caret-dark.png
deleted file mode 100644
index 97c64c6a7203c89f8a0074a13bb53bb5a1d319ce..0000000000000000000000000000000000000000
Binary files a/core/img/actions/caret-dark.png and /dev/null differ
diff --git a/core/img/actions/caret.png b/core/img/actions/caret.png
deleted file mode 100644
index 3a8dd99176d6956dae065e0e274cb146382236d4..0000000000000000000000000000000000000000
Binary files a/core/img/actions/caret.png and /dev/null differ
diff --git a/core/img/actions/checkbox-checked-disabled.png b/core/img/actions/checkbox-checked-disabled.png
deleted file mode 100644
index 55980ba730d193e82e2b0f2cedd4efd49cf6a150..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkbox-checked-disabled.png and /dev/null differ
diff --git a/core/img/actions/checkbox-checked-white.png b/core/img/actions/checkbox-checked-white.png
deleted file mode 100644
index ed8e3d3d5579d4ab5bf504002ba674e34d9b1f4a..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkbox-checked-white.png and /dev/null differ
diff --git a/core/img/actions/checkbox-checked.png b/core/img/actions/checkbox-checked.png
deleted file mode 100644
index 58e9f8ba00b19f138af725bc77e22d97d92706f0..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkbox-checked.png and /dev/null differ
diff --git a/core/img/actions/checkbox-disabled-white.png b/core/img/actions/checkbox-disabled-white.png
deleted file mode 100644
index e1f48439d270fb9ecb882ae8e5ccb94e02dd7e0c..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkbox-disabled-white.png and /dev/null differ
diff --git a/core/img/actions/checkbox-disabled.png b/core/img/actions/checkbox-disabled.png
deleted file mode 100644
index a2ead20996562993ec08eaa551ff4a1cb68afd94..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkbox-disabled.png and /dev/null differ
diff --git a/core/img/actions/checkbox-mixed-white.png b/core/img/actions/checkbox-mixed-white.png
deleted file mode 100644
index 0b81f998fc599b02e08aad5adbd533e047b286ea..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkbox-mixed-white.png and /dev/null differ
diff --git a/core/img/actions/checkbox-mixed.png b/core/img/actions/checkbox-mixed.png
deleted file mode 100644
index cc27ec651eaf25f0d186772adcd63e8ce3b1c399..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkbox-mixed.png and /dev/null differ
diff --git a/core/img/actions/checkbox-white.png b/core/img/actions/checkbox-white.png
deleted file mode 100644
index f0f903c77c6fac730541d2c2dd392e79e44e93cd..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkbox-white.png and /dev/null differ
diff --git a/core/img/actions/checkbox.png b/core/img/actions/checkbox.png
deleted file mode 100644
index 770b7ef82037fcc3b3ab6a628fbdb0762846013f..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkbox.png and /dev/null differ
diff --git a/core/img/actions/checkmark-color.png b/core/img/actions/checkmark-color.png
deleted file mode 100644
index a8ab849cad7267e74034306dcbdb5023a801cb50..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkmark-color.png and /dev/null differ
diff --git a/core/img/actions/checkmark-white.png b/core/img/actions/checkmark-white.png
deleted file mode 100644
index 27f17204b1da7c06dfad3325937cc4ac7f2cc01c..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkmark-white.png and /dev/null differ
diff --git a/core/img/actions/checkmark.png b/core/img/actions/checkmark.png
deleted file mode 100644
index c1a8be786cd59c2e5e28de1ec448bb566491b872..0000000000000000000000000000000000000000
Binary files a/core/img/actions/checkmark.png and /dev/null differ
diff --git a/core/img/actions/close.png b/core/img/actions/close.png
deleted file mode 100644
index 66e3c26cc65a1b9e48fbcce71fcdea12e5df7093..0000000000000000000000000000000000000000
Binary files a/core/img/actions/close.png and /dev/null differ
diff --git a/core/img/actions/comment.png b/core/img/actions/comment.png
deleted file mode 100644
index 08867cf6361ef6e19bb5bed0159ba2e672dcb2c9..0000000000000000000000000000000000000000
Binary files a/core/img/actions/comment.png and /dev/null differ
diff --git a/core/img/actions/confirm.png b/core/img/actions/confirm.png
deleted file mode 100644
index 3021d4c27d6db047a0355b801a376d8f06b3e734..0000000000000000000000000000000000000000
Binary files a/core/img/actions/confirm.png and /dev/null differ
diff --git a/core/img/actions/delete-hover.png b/core/img/actions/delete-hover.png
deleted file mode 100644
index ed12640df7133147f781bf2b0df11c6c78d71b0e..0000000000000000000000000000000000000000
Binary files a/core/img/actions/delete-hover.png and /dev/null differ
diff --git a/core/img/actions/delete-white.png b/core/img/actions/delete-white.png
deleted file mode 100644
index 07a5de342526821d9e00b7f82f4e07add4056861..0000000000000000000000000000000000000000
Binary files a/core/img/actions/delete-white.png and /dev/null differ
diff --git a/core/img/actions/delete.png b/core/img/actions/delete.png
deleted file mode 100644
index 20e894c7f740da793d98590fa12e998749ae2ad3..0000000000000000000000000000000000000000
Binary files a/core/img/actions/delete.png and /dev/null differ
diff --git a/core/img/actions/details.png b/core/img/actions/details.png
deleted file mode 100644
index 9145025be26c0e86e294ce98e1f883199c4d6366..0000000000000000000000000000000000000000
Binary files a/core/img/actions/details.png and /dev/null differ
diff --git a/core/img/actions/download-white.png b/core/img/actions/download-white.png
deleted file mode 100644
index 815b551354f4249157b4575c17f9991a836b1c8e..0000000000000000000000000000000000000000
Binary files a/core/img/actions/download-white.png and /dev/null differ
diff --git a/core/img/actions/download.png b/core/img/actions/download.png
deleted file mode 100644
index 1f8e1a4f7e167efc019708a635eb763445dc255b..0000000000000000000000000000000000000000
Binary files a/core/img/actions/download.png and /dev/null differ
diff --git a/core/img/actions/edit.png b/core/img/actions/edit.png
deleted file mode 100644
index 7ca20eba363b77d280b976c690ce778e9c4d2fbe..0000000000000000000000000000000000000000
Binary files a/core/img/actions/edit.png and /dev/null differ
diff --git a/core/img/actions/error-color.png b/core/img/actions/error-color.png
deleted file mode 100644
index 7d00282312ab9d50f4634201e03f97a51a59af41..0000000000000000000000000000000000000000
Binary files a/core/img/actions/error-color.png and /dev/null differ
diff --git a/core/img/actions/error-white.png b/core/img/actions/error-white.png
deleted file mode 100644
index 6e15865401d6bee0f86181429c67f7ffb566187f..0000000000000000000000000000000000000000
Binary files a/core/img/actions/error-white.png and /dev/null differ
diff --git a/core/img/actions/error.png b/core/img/actions/error.png
deleted file mode 100644
index 61df76b53ea5ef14cd1acffc997fc6d090a451c4..0000000000000000000000000000000000000000
Binary files a/core/img/actions/error.png and /dev/null differ
diff --git a/core/img/actions/external.png b/core/img/actions/external.png
deleted file mode 100644
index af03dbf3e05397a5aa029b699297933729f55d56..0000000000000000000000000000000000000000
Binary files a/core/img/actions/external.png and /dev/null differ
diff --git a/core/img/actions/history.png b/core/img/actions/history.png
deleted file mode 100644
index ec2bbd0587fc5a4eba586e0fa47c468712b86a38..0000000000000000000000000000000000000000
Binary files a/core/img/actions/history.png and /dev/null differ
diff --git a/core/img/actions/info-white.png b/core/img/actions/info-white.png
deleted file mode 100644
index 670d7309c4eec4e6c8e462309db6511d66d4c8af..0000000000000000000000000000000000000000
Binary files a/core/img/actions/info-white.png and /dev/null differ
diff --git a/core/img/actions/info.png b/core/img/actions/info.png
deleted file mode 100644
index b280a019ab4beb72c254931fe604c9c1effa1085..0000000000000000000000000000000000000000
Binary files a/core/img/actions/info.png and /dev/null differ
diff --git a/core/img/actions/logout.png b/core/img/actions/logout.png
deleted file mode 100644
index 7739106678975e16eab01ad16ad892c562cad3f8..0000000000000000000000000000000000000000
Binary files a/core/img/actions/logout.png and /dev/null differ
diff --git a/core/img/actions/mail.png b/core/img/actions/mail.png
deleted file mode 100644
index 6d06259cd0882ec5c7cb72eb76245e2f936ffbfa..0000000000000000000000000000000000000000
Binary files a/core/img/actions/mail.png and /dev/null differ
diff --git a/core/img/actions/menu.png b/core/img/actions/menu.png
deleted file mode 100644
index 583ce319175c4f7d05a224798d393d82fe4b9a38..0000000000000000000000000000000000000000
Binary files a/core/img/actions/menu.png and /dev/null differ
diff --git a/core/img/actions/more.png b/core/img/actions/more.png
deleted file mode 100644
index 880d5dccce38619118357b1288cf07003f870f72..0000000000000000000000000000000000000000
Binary files a/core/img/actions/more.png and /dev/null differ
diff --git a/core/img/actions/password.png b/core/img/actions/password.png
deleted file mode 100644
index 3619fabab9a05d84462949f49f1ed40d05dfe84f..0000000000000000000000000000000000000000
Binary files a/core/img/actions/password.png and /dev/null differ
diff --git a/core/img/actions/pause-big.png b/core/img/actions/pause-big.png
deleted file mode 100644
index 054281c63143b8779d43cc1bb6b6beaf90c312d0..0000000000000000000000000000000000000000
Binary files a/core/img/actions/pause-big.png and /dev/null differ
diff --git a/core/img/actions/pause.png b/core/img/actions/pause.png
deleted file mode 100644
index d4b865e3401856e4c763b2425906eb40e4ec591e..0000000000000000000000000000000000000000
Binary files a/core/img/actions/pause.png and /dev/null differ
diff --git a/core/img/actions/play-add.png b/core/img/actions/play-add.png
deleted file mode 100644
index ccf77d2a062e93c9854006485437b6f6f9b8ace6..0000000000000000000000000000000000000000
Binary files a/core/img/actions/play-add.png and /dev/null differ
diff --git a/core/img/actions/play-big.png b/core/img/actions/play-big.png
deleted file mode 100644
index 7d4916cb204c7d7322beb8a0a0c7852942e8195f..0000000000000000000000000000000000000000
Binary files a/core/img/actions/play-big.png and /dev/null differ
diff --git a/core/img/actions/play-next.png b/core/img/actions/play-next.png
deleted file mode 100644
index 50cd91d240ec5c09e0e589b75da72499dcfcd4b7..0000000000000000000000000000000000000000
Binary files a/core/img/actions/play-next.png and /dev/null differ
diff --git a/core/img/actions/play-previous.png b/core/img/actions/play-previous.png
deleted file mode 100644
index c380e96bb58dfa550ace9ef570153b4e8335017b..0000000000000000000000000000000000000000
Binary files a/core/img/actions/play-previous.png and /dev/null differ
diff --git a/core/img/actions/play.png b/core/img/actions/play.png
deleted file mode 100644
index 7994424c65cb1acf6a6fee475f476dda1428c909..0000000000000000000000000000000000000000
Binary files a/core/img/actions/play.png and /dev/null differ
diff --git a/core/img/actions/public.png b/core/img/actions/public.png
deleted file mode 100644
index 772838ad2058e5e6e16c9fcb13e1bb6708155238..0000000000000000000000000000000000000000
Binary files a/core/img/actions/public.png and /dev/null differ
diff --git a/core/img/actions/radio-checked-disabled.png b/core/img/actions/radio-checked-disabled.png
deleted file mode 100644
index 09abc410f618214c27f1c46afff9d424bc14297a..0000000000000000000000000000000000000000
Binary files a/core/img/actions/radio-checked-disabled.png and /dev/null differ
diff --git a/core/img/actions/radio-checked.png b/core/img/actions/radio-checked.png
deleted file mode 100644
index f3d061156933b798bb161243a58888b4ad9b6635..0000000000000000000000000000000000000000
Binary files a/core/img/actions/radio-checked.png and /dev/null differ
diff --git a/core/img/actions/radio-disabled.png b/core/img/actions/radio-disabled.png
deleted file mode 100644
index ac7f49ed53310e48d982e01d8a95db0691054229..0000000000000000000000000000000000000000
Binary files a/core/img/actions/radio-disabled.png and /dev/null differ
diff --git a/core/img/actions/radio-white.png b/core/img/actions/radio-white.png
deleted file mode 100644
index 04beefdff014133e9d282f587ff57755feb12248..0000000000000000000000000000000000000000
Binary files a/core/img/actions/radio-white.png and /dev/null differ
diff --git a/core/img/actions/radio.png b/core/img/actions/radio.png
deleted file mode 100644
index 70ac4741b978b0071c4d672e0e7aa28c0f5709dc..0000000000000000000000000000000000000000
Binary files a/core/img/actions/radio.png and /dev/null differ
diff --git a/core/img/actions/rename.png b/core/img/actions/rename.png
deleted file mode 100644
index 975bd2d7031d55e599dd8b8e788799afac376356..0000000000000000000000000000000000000000
Binary files a/core/img/actions/rename.png and /dev/null differ
diff --git a/core/img/actions/search-white.png b/core/img/actions/search-white.png
deleted file mode 100644
index 9812c44a3d6bc3073bb2e32c4b1ff0d086f71e4b..0000000000000000000000000000000000000000
Binary files a/core/img/actions/search-white.png and /dev/null differ
diff --git a/core/img/actions/search.png b/core/img/actions/search.png
deleted file mode 100644
index 5f4767a6f461956689bc15b231cafe91e5690481..0000000000000000000000000000000000000000
Binary files a/core/img/actions/search.png and /dev/null differ
diff --git a/core/img/actions/settings.png b/core/img/actions/settings.png
deleted file mode 100644
index 3ab939ca37a4fb3a96846aed3102acef0efd7416..0000000000000000000000000000000000000000
Binary files a/core/img/actions/settings.png and /dev/null differ
diff --git a/core/img/actions/share.png b/core/img/actions/share.png
deleted file mode 100644
index fdacbbabebcf013a5a80907b3e62cb2e3c0ee26d..0000000000000000000000000000000000000000
Binary files a/core/img/actions/share.png and /dev/null differ
diff --git a/core/img/actions/shared.png b/core/img/actions/shared.png
deleted file mode 100644
index fdacbbabebcf013a5a80907b3e62cb2e3c0ee26d..0000000000000000000000000000000000000000
Binary files a/core/img/actions/shared.png and /dev/null differ
diff --git a/core/img/actions/sound-off.png b/core/img/actions/sound-off.png
deleted file mode 100644
index 0457de8e4d1cbff1c62ca9234a1589467c8ac8e1..0000000000000000000000000000000000000000
Binary files a/core/img/actions/sound-off.png and /dev/null differ
diff --git a/core/img/actions/sound.png b/core/img/actions/sound.png
deleted file mode 100644
index e849b4d248b3590426420336af60951413a89c2f..0000000000000000000000000000000000000000
Binary files a/core/img/actions/sound.png and /dev/null differ
diff --git a/core/img/actions/star.png b/core/img/actions/star.png
deleted file mode 100644
index 88e4ad54584fa3cae3d390938aaee9afb0b547fc..0000000000000000000000000000000000000000
Binary files a/core/img/actions/star.png and /dev/null differ
diff --git a/core/img/actions/starred.png b/core/img/actions/starred.png
deleted file mode 100644
index 22e68c757e79535d4378a7e7539b5f6e99dfb401..0000000000000000000000000000000000000000
Binary files a/core/img/actions/starred.png and /dev/null differ
diff --git a/core/img/actions/toggle-filelist.png b/core/img/actions/toggle-filelist.png
deleted file mode 100644
index 0926a726d53e1cbf6ad2646f5a84a9ff1ef33201..0000000000000000000000000000000000000000
Binary files a/core/img/actions/toggle-filelist.png and /dev/null differ
diff --git a/core/img/actions/toggle-pictures.png b/core/img/actions/toggle-pictures.png
deleted file mode 100644
index 7499d5b7809884da195be32975d5e71c26ae0e0b..0000000000000000000000000000000000000000
Binary files a/core/img/actions/toggle-pictures.png and /dev/null differ
diff --git a/core/img/actions/toggle.png b/core/img/actions/toggle.png
deleted file mode 100644
index 24a6a4d47de12117417066ca90138a7464017439..0000000000000000000000000000000000000000
Binary files a/core/img/actions/toggle.png and /dev/null differ
diff --git a/core/img/actions/triangle-e.png b/core/img/actions/triangle-e.png
deleted file mode 100644
index 4ce1086f61d4f9ea9333f695407831e2b800819f..0000000000000000000000000000000000000000
Binary files a/core/img/actions/triangle-e.png and /dev/null differ
diff --git a/core/img/actions/triangle-n.png b/core/img/actions/triangle-n.png
deleted file mode 100644
index 2042d66532c01d7266d157a7c665bd7301321405..0000000000000000000000000000000000000000
Binary files a/core/img/actions/triangle-n.png and /dev/null differ
diff --git a/core/img/actions/triangle-s.png b/core/img/actions/triangle-s.png
deleted file mode 100644
index 97c64c6a7203c89f8a0074a13bb53bb5a1d319ce..0000000000000000000000000000000000000000
Binary files a/core/img/actions/triangle-s.png and /dev/null differ
diff --git a/core/img/actions/upload-white.png b/core/img/actions/upload-white.png
deleted file mode 100644
index 28693f855d3e8243fe54d533451921ce585d3770..0000000000000000000000000000000000000000
Binary files a/core/img/actions/upload-white.png and /dev/null differ
diff --git a/core/img/actions/upload.png b/core/img/actions/upload.png
deleted file mode 100644
index 8955ed9641202f08a70536bf9708e67eb7d328f2..0000000000000000000000000000000000000000
Binary files a/core/img/actions/upload.png and /dev/null differ
diff --git a/core/img/actions/user.png b/core/img/actions/user.png
deleted file mode 100644
index 5f2fddc0ea3fbd3a1c45eea0f477a62c4a85f95d..0000000000000000000000000000000000000000
Binary files a/core/img/actions/user.png and /dev/null differ
diff --git a/core/img/actions/view-close.png b/core/img/actions/view-close.png
deleted file mode 100644
index eae9acc7a4301f25f0bdf3cda51708e51fb7d057..0000000000000000000000000000000000000000
Binary files a/core/img/actions/view-close.png and /dev/null differ
diff --git a/core/img/actions/view-download.png b/core/img/actions/view-download.png
deleted file mode 100644
index 29e1b6fec70bd0c0bf9717f3cf00011a9afe6ae4..0000000000000000000000000000000000000000
Binary files a/core/img/actions/view-download.png and /dev/null differ
diff --git a/core/img/actions/view-next.png b/core/img/actions/view-next.png
deleted file mode 100644
index be8cc15cecdf1790a32004c1fa4111fb559e0cef..0000000000000000000000000000000000000000
Binary files a/core/img/actions/view-next.png and /dev/null differ
diff --git a/core/img/actions/view-pause.png b/core/img/actions/view-pause.png
deleted file mode 100644
index 94cd1a5dc6c938962bf4d856fe056f4405bd248e..0000000000000000000000000000000000000000
Binary files a/core/img/actions/view-pause.png and /dev/null differ
diff --git a/core/img/actions/view-play.png b/core/img/actions/view-play.png
deleted file mode 100644
index a8398d5758f44f1616e3682098d90d20ec0bf6a7..0000000000000000000000000000000000000000
Binary files a/core/img/actions/view-play.png and /dev/null differ
diff --git a/core/img/actions/view-previous.png b/core/img/actions/view-previous.png
deleted file mode 100644
index 86e2a809626cb0683078e5582d1f37719c07f7de..0000000000000000000000000000000000000000
Binary files a/core/img/actions/view-previous.png and /dev/null differ
diff --git a/core/img/breadcrumb.png b/core/img/breadcrumb.png
deleted file mode 100644
index 5556920aa73b4b7778c6e89e5c6caa5d3abde86d..0000000000000000000000000000000000000000
Binary files a/core/img/breadcrumb.png and /dev/null differ
diff --git a/core/img/desktopapp.png b/core/img/desktopapp.png
deleted file mode 100644
index 272397c949e6846c73280de2a29a42e678e63a09..0000000000000000000000000000000000000000
Binary files a/core/img/desktopapp.png and /dev/null differ
diff --git a/core/img/filetypes/application-pdf.png b/core/img/filetypes/application-pdf.png
deleted file mode 100644
index c215094eaa777c8d06bd2197399065e7f4b812fe..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/application-pdf.png and /dev/null differ
diff --git a/core/img/filetypes/application.png b/core/img/filetypes/application.png
deleted file mode 100644
index d9db3b9114ccad32c2f06b064e21976cd9a2b021..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/application.png and /dev/null differ
diff --git a/core/img/filetypes/audio.png b/core/img/filetypes/audio.png
deleted file mode 100644
index 3d52756341acdc897f1abf5ba55306153cb905da..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/audio.png and /dev/null differ
diff --git a/core/img/filetypes/file.png b/core/img/filetypes/file.png
deleted file mode 100644
index 74add13f2760e194a8145532201f6bdc478ea9ed..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/file.png and /dev/null differ
diff --git a/core/img/filetypes/folder-drag-accept.png b/core/img/filetypes/folder-drag-accept.png
deleted file mode 100644
index 44a3720fef4ae918dd73ae555131ea2fd21798ba..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/folder-drag-accept.png and /dev/null differ
diff --git a/core/img/filetypes/folder-external.png b/core/img/filetypes/folder-external.png
deleted file mode 100644
index 79dcbeaf731541cb00b4c88cfbd3649dd710ce0e..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/folder-external.png and /dev/null differ
diff --git a/core/img/filetypes/folder-public.png b/core/img/filetypes/folder-public.png
deleted file mode 100644
index b9181f640b2686db04b45fe1fb7a4a821cc3e784..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/folder-public.png and /dev/null differ
diff --git a/core/img/filetypes/folder-shared.png b/core/img/filetypes/folder-shared.png
deleted file mode 100644
index 1cc6de7a029fbbe6ef7140e446065df128d4ea33..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/folder-shared.png and /dev/null differ
diff --git a/core/img/filetypes/folder-starred.png b/core/img/filetypes/folder-starred.png
deleted file mode 100644
index 99d79c14a1d3d104f95b1d04f20fb7bdc5dea3cc..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/folder-starred.png and /dev/null differ
diff --git a/core/img/filetypes/folder.png b/core/img/filetypes/folder.png
deleted file mode 100644
index 2262998cb3c72e02820508d8308216912d920330..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/folder.png and /dev/null differ
diff --git a/core/img/filetypes/image.png b/core/img/filetypes/image.png
deleted file mode 100644
index 8ff5e6c119fda8354bd7ab90ea3ed8345d20e00a..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/image.png and /dev/null differ
diff --git a/core/img/filetypes/package-x-generic.png b/core/img/filetypes/package-x-generic.png
deleted file mode 100644
index 389b44cc2a3bedbaee354dfc5b1028df7f383c77..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/package-x-generic.png and /dev/null differ
diff --git a/core/img/filetypes/text-calendar.png b/core/img/filetypes/text-calendar.png
deleted file mode 100644
index f21c3a9951d2e7188a5c2980fa63463f268b5afe..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/text-calendar.png and /dev/null differ
diff --git a/core/img/filetypes/text-code.png b/core/img/filetypes/text-code.png
deleted file mode 100644
index 69744e499e6edae39545353f6ebfebb0bb3fdfcd..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/text-code.png and /dev/null differ
diff --git a/core/img/filetypes/text-vcard.png b/core/img/filetypes/text-vcard.png
deleted file mode 100644
index 087eadaabd123e5e7ecd60b6c0351be96313060b..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/text-vcard.png and /dev/null differ
diff --git a/core/img/filetypes/text.png b/core/img/filetypes/text.png
deleted file mode 100644
index d6bec70cf43e2deacb8b42f2f9201693a7329922..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/text.png and /dev/null differ
diff --git a/core/img/filetypes/video.png b/core/img/filetypes/video.png
deleted file mode 100644
index 7cc1ecdc46a0e9cb0b0d1653b6a75450e79a101c..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/video.png and /dev/null differ
diff --git a/core/img/filetypes/x-office-document.png b/core/img/filetypes/x-office-document.png
deleted file mode 100644
index 3bc2f08d1f9d7c848152864c94407d9232f3b877..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/x-office-document.png and /dev/null differ
diff --git a/core/img/filetypes/x-office-presentation.png b/core/img/filetypes/x-office-presentation.png
deleted file mode 100644
index 644fb852009e9a6d057d23cd0ab14fc8d02e6c04..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/x-office-presentation.png and /dev/null differ
diff --git a/core/img/filetypes/x-office-spreadsheet.png b/core/img/filetypes/x-office-spreadsheet.png
deleted file mode 100644
index 8f79c32fe01e201d5c5e458327628b0c31d4712d..0000000000000000000000000000000000000000
Binary files a/core/img/filetypes/x-office-spreadsheet.png and /dev/null differ
diff --git a/core/img/logo-icon.png b/core/img/logo-icon.png
deleted file mode 100644
index 4ffb2bb953ada1d389f20f1c960ac5564c457fa1..0000000000000000000000000000000000000000
Binary files a/core/img/logo-icon.png and /dev/null differ
diff --git a/core/img/places/calendar-dark.png b/core/img/places/calendar-dark.png
deleted file mode 100644
index 9dc21d8a7b8e92695e62da15b4f5d551a42b0681..0000000000000000000000000000000000000000
Binary files a/core/img/places/calendar-dark.png and /dev/null differ
diff --git a/core/img/places/contacts-dark.png b/core/img/places/contacts-dark.png
deleted file mode 100644
index fe03bbfe1a4f0cbeb04ff4bde9bb354cb4a86761..0000000000000000000000000000000000000000
Binary files a/core/img/places/contacts-dark.png and /dev/null differ
diff --git a/core/img/places/files.png b/core/img/places/files.png
deleted file mode 100644
index e317fc3c722b9d2ff4d51286a5f8716c6a0dc99a..0000000000000000000000000000000000000000
Binary files a/core/img/places/files.png and /dev/null differ
diff --git a/core/img/places/home.png b/core/img/places/home.png
deleted file mode 100644
index 2e0313d59a7a5c8502f81dc8806c2429e744b1cc..0000000000000000000000000000000000000000
Binary files a/core/img/places/home.png and /dev/null differ
diff --git a/core/img/places/link.png b/core/img/places/link.png
deleted file mode 100644
index 8ba9f6530fb65e1b245ccc0ed661d8431381b7fc..0000000000000000000000000000000000000000
Binary files a/core/img/places/link.png and /dev/null differ
diff --git a/core/img/places/music.png b/core/img/places/music.png
deleted file mode 100644
index 0670544fedc635215d1313921ac8c2cbd879c8d0..0000000000000000000000000000000000000000
Binary files a/core/img/places/music.png and /dev/null differ
diff --git a/core/img/places/picture.png b/core/img/places/picture.png
deleted file mode 100644
index 171af526e9d5125b00d46a1e353b60118f33834c..0000000000000000000000000000000000000000
Binary files a/core/img/places/picture.png and /dev/null differ
diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js
index ea034f0aff7060428c81dba1b79fb397e7657889..15b58f9e08643900da50f64cabb986da873ede9d 100644
--- a/core/js/jquery.ocdialog.js
+++ b/core/js/jquery.ocdialog.js
@@ -145,7 +145,7 @@
 					break;
 				case 'closeButton':
 					if(value) {
-						var $closeButton = $('<a class="oc-dialog-close svg"></a>');
+						var $closeButton = $('<a class="oc-dialog-close"></a>');
 						this.$dialog.prepend($closeButton);
 						$closeButton.on('click', function() {
 							self.close();
diff --git a/core/js/js.js b/core/js/js.js
index 7f98668dcb277cdea1e839385762b83beb842212..07ed396bec9bed8e5466422d47c979b48e20d753 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -327,8 +327,8 @@ var OC={
 	 * @return {string}
 	 */
 	imagePath:function(app,file){
-		if(file.indexOf('.')==-1){//if no extension is given, use png or svg depending on browser support
-			file+=(OC.Util.hasSVGSupport())?'.svg':'.png';
+		if(file.indexOf('.')==-1){//if no extension is given, use svg
+			file+='.svg';
 		}
 		return OC.filePath(app,'img',file);
 	},
@@ -592,7 +592,7 @@ var OC={
 			var arrowclass = settings.hasClass('topright') ? 'up' : 'left';
 			var jqxhr = $.get(OC.filePath(props.appid, '', props.scriptName), function(data) {
 				popup.html(data).ready(function() {
-					popup.prepend('<span class="arrow '+arrowclass+'"></span><h2>'+t('core', 'Settings')+'</h2><a class="close svg"></a>').show();
+					popup.prepend('<span class="arrow '+arrowclass+'"></span><h2>'+t('core', 'Settings')+'</h2><a class="close"></a>').show();
 					popup.find('.close').bind('click', function() {
 						popup.remove();
 					});
@@ -613,9 +613,6 @@ var OC={
 							throw e;
 						});
 					}
-					if(!OC.Util.hasSVGSupport()) {
-						OC.Util.replaceSVG();
-					}
 				}).show();
 			}, 'html');
 		}
@@ -1357,49 +1354,6 @@ if(typeof localStorage !=='undefined' && localStorage !== null){
 	};
 }
 
-/**
- * check if the browser support svg images
- * @return {boolean}
- */
-function SVGSupport() {
-	return SVGSupport.checkMimeType.correct && !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', "svg").createSVGRect;
-}
-SVGSupport.checkMimeType=function(){
-	$.ajax({
-		url: OC.imagePath('core','breadcrumb.svg'),
-		success:function(data,text,xhr){
-			var headerParts=xhr.getAllResponseHeaders().split("\n");
-			var headers={};
-			$.each(headerParts,function(i,text){
-				if(text){
-					var parts=text.split(':',2);
-					if(parts.length===2){
-						var value=parts[1].trim();
-						if(value[0]==='"'){
-							value=value.substr(1,value.length-2);
-						}
-						headers[parts[0].toLowerCase()]=value;
-					}
-				}
-			});
-			if(headers["content-type"]!=='image/svg+xml'){
-				OC.Util.replaceSVG();
-				SVGSupport.checkMimeType.correct=false;
-			}
-		}
-	});
-};
-SVGSupport.checkMimeType.correct=true;
-
-/**
- * Replace all svg images with png for browser compatibility
- * @param $el
- * @deprecated use OC.Util.replaceSVG instead
- */
-function replaceSVG($el){
-	return OC.Util.replaceSVG($el);
-}
-
 /**
  * prototypical inheritance functions
  * @todo Write documentation
@@ -1517,12 +1471,6 @@ function initCore() {
 		initSessionHeartBeat();
 	}
 
-	if(!OC.Util.hasSVGSupport()){ //replace all svg images with png images for browser that don't support svg
-		OC.Util.replaceSVG();
-	}else{
-		SVGSupport.checkMimeType();
-	}
-
 	OC.registerMenu($('#expand'), $('#expanddiv'));
 
 	// toggle for menus
@@ -1791,24 +1739,21 @@ OC.Util = {
 	},
 	/**
 	 * Returns whether the browser supports SVG
+	 * @deprecated SVG is always supported (since 9.0)
 	 * @return {boolean} true if the browser supports SVG, false otherwise
 	 */
-	// TODO: replace with original function
-	hasSVGSupport: SVGSupport,
+	hasSVGSupport: function(){
+		return true
+	},
 	/**
 	 * If SVG is not supported, replaces the given icon's extension
 	 * from ".svg" to ".png".
 	 * If SVG is supported, return the image path as is.
 	 * @param {string} file image path with svg extension
+	 * @deprecated SVG is always supported (since 9.0)
 	 * @return {string} fixed image path with png extension if SVG is not supported
 	 */
 	replaceSVGIcon: function(file) {
-		if (file && !OC.Util.hasSVGSupport()) {
-			var i = file.lastIndexOf('.svg');
-			if (i >= 0) {
-				file = file.substr(0, i) + '.png' + file.substr(i+4);
-			}
-		}
 		return file;
 	},
 	/**
@@ -1816,39 +1761,9 @@ OC.Util = {
 	 * with PNG images.
 	 *
 	 * @param $el root element from which to search, defaults to $('body')
+	 * @deprecated SVG is always supported (since 9.0)
 	 */
-	replaceSVG: function($el) {
-		if (!$el) {
-			$el = $('body');
-		}
-		$el.find('img.svg').each(function(index,element){
-			element=$(element);
-			var src=element.attr('src');
-			element.attr('src',src.substr(0, src.length-3) + 'png');
-		});
-		$el.find('.svg').each(function(index,element){
-			element = $(element);
-			var background = element.css('background-image');
-			if (background){
-				var i = background.lastIndexOf('.svg');
-				if (i >= 0){
-					background = background.substr(0,i) + '.png' + background.substr(i + 4);
-					element.css('background-image', background);
-				}
-			}
-			element.find('*').each(function(index, element) {
-				element = $(element);
-				var background = element.css('background-image');
-				if (background) {
-					var i = background.lastIndexOf('.svg');
-					if(i >= 0){
-						background = background.substr(0,i) + '.png' + background.substr(i + 4);
-						element.css('background-image', background);
-					}
-				}
-			});
-		});
-	},
+	replaceSVG: function($el) {},
 
 	/**
 	 * Fix image scaling for IE8, since background-size is not supported.
diff --git a/core/js/mimetype.js b/core/js/mimetype.js
index 3cc33ce283051cced1a5b2ff9d639616c1a7b69e..0d30da26c26598663f76f533d64ea283dbd5e6e6 100644
--- a/core/js/mimetype.js
+++ b/core/js/mimetype.js
@@ -29,7 +29,7 @@ OC.MimeType = {
 	 * Cache that maps mimeTypes to icon urls
 	 */
 	_mimeTypeIcons: {},
-	
+
 	/**
 	 * Return the file icon we want to use for the given mimeType.
 	 * The file needs to be present in the supplied file list
@@ -60,7 +60,7 @@ OC.MimeType = {
 
 		return null;
 	},
-	
+
 	/**
 	 * Return the url to icon of the given mimeType
 	 *
@@ -91,19 +91,14 @@ OC.MimeType = {
 				path += icon;
 			}
 		}
-		
+
 		// If we do not yet have an icon fall back to the default
 		if (gotIcon === null) {
 			path = OC.webroot + '/core/img/filetypes/';
 			path += OC.MimeType._getFile(mimeType, OC.MimeTypeList.files);
 		}
 
-		// Use svg if we can
-		if(OC.Util.hasSVGSupport()){
-			path += '.svg';
-		} else {
-			path += '.png';
-		}
+		path += '.svg';
 
 		// Cache the result
 		OC.MimeType._mimeTypeIcons[mimeType] = path;
@@ -111,5 +106,3 @@ OC.MimeType = {
 	}
 
 };
-
-
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index 83fde154615062d66024b338e625fc1c91d85462..85dee9789876919797483fd896890a24c66656ff 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -38,7 +38,7 @@
 					'<span class="shareOption">' +
 						'<input id="canEdit-{{cid}}-{{shareWith}}" type="checkbox" name="edit" class="permissions checkbox" {{#if hasEditPermission}}checked="checked"{{/if}} />' +
 						'<label for="canEdit-{{cid}}-{{shareWith}}">{{canEditLabel}}</label>' +
-						'<a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
+						'<a href="#" class="showCruds"><img alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
 					'</span>' +
 					'{{/if}}' +
 					'<div class="cruds hidden">' +
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js
index a4bfde1777bec9fce74c0c393aef233a619dd7ef..c17da94bab3d3f42cd309ee1cc73a818b3ba705e 100644
--- a/core/js/sharedialogview.js
+++ b/core/js/sharedialogview.js
@@ -30,7 +30,7 @@
 		'<div class="loading hidden" style="height: 50px"></div>';
 
 	var TEMPLATE_REMOTE_SHARE_INFO =
-		'<a target="_blank" class="icon-info svg shareWithRemoteInfo hasTooltip" href="{{docLink}}" ' +
+		'<a target="_blank" class="icon-info shareWithRemoteInfo hasTooltip" href="{{docLink}}" ' +
 		'title="{{tooltip}}"></a>';
 
 	/**
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js
index 56ed3f0039b5d31e9a6406ea7d4703750b5d47c7..8ea0bf28b388a7c2cd922909852c1dc6fa38c157 100644
--- a/core/js/shareitemmodel.js
+++ b/core/js/shareitemmodel.js
@@ -187,7 +187,7 @@
 			}).fail(function(xhr) {
 				var msg = t('core', 'Error');
 				var result = xhr.responseJSON;
-				if (result.ocs && result.ocs.meta) {
+				if (result && result.ocs && result.ocs.meta) {
 					msg = result.ocs.meta.message;
 				}
 
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js
index 3d19a38c4168b45bbbde0987caf86bd92259ff80..1ffe7b38a40bc04a747466e02e06dd634822f6fb 100644
--- a/core/js/tests/specs/coreSpec.js
+++ b/core/js/tests/specs/coreSpec.js
@@ -231,22 +231,12 @@ describe('Core base tests', function() {
 		});
 		describe('Images', function() {
 			it('Generates image path with given extension', function() {
-				var svgSupportStub = sinon.stub(OC.Util, 'hasSVGSupport', function() { return true; });
 				expect(OC.imagePath('core', 'somefile.jpg')).toEqual(OC.webroot + '/core/img/somefile.jpg');
 				expect(OC.imagePath(TESTAPP, 'somefile.jpg')).toEqual(TESTAPP_ROOT + '/img/somefile.jpg');
-				svgSupportStub.restore();
 			});
-			it('Generates image path with svg extension when svg support exists', function() {
-				var svgSupportStub = sinon.stub(OC.Util, 'hasSVGSupport', function() { return true; });
+			it('Generates image path with svg extension', function() {
 				expect(OC.imagePath('core', 'somefile')).toEqual(OC.webroot + '/core/img/somefile.svg');
 				expect(OC.imagePath(TESTAPP, 'somefile')).toEqual(TESTAPP_ROOT + '/img/somefile.svg');
-				svgSupportStub.restore();
-			});
-			it('Generates image path with png ext when svg support is not available', function() {
-				var svgSupportStub = sinon.stub(OC.Util, 'hasSVGSupport', function() { return false; });
-				expect(OC.imagePath('core', 'somefile')).toEqual(OC.webroot + '/core/img/somefile.png');
-				expect(OC.imagePath(TESTAPP, 'somefile')).toEqual(TESTAPP_ROOT + '/img/somefile.png');
-				svgSupportStub.restore();
 			});
 		});
 	});
@@ -504,32 +494,6 @@ describe('Core base tests', function() {
 			expect($navigation.is(':visible')).toEqual(false);
 		});
 	});
-	describe('SVG extension replacement', function() {
-		var svgSupportStub;
-
-		beforeEach(function() {
-			svgSupportStub = sinon.stub(OC.Util, 'hasSVGSupport');
-		});
-		afterEach(function() {
-			svgSupportStub.restore();
-		});
-		it('does not replace svg extension with png when SVG is supported', function() {
-			svgSupportStub.returns(true);
-			expect(
-				OC.Util.replaceSVGIcon('/path/to/myicon.svg?someargs=1')
-			).toEqual(
-				'/path/to/myicon.svg?someargs=1'
-			);
-		});
-		it('replaces svg extension with png when SVG not supported', function() {
-			svgSupportStub.returns(false);
-			expect(
-				OC.Util.replaceSVGIcon('/path/to/myicon.svg?someargs=1')
-			).toEqual(
-				'/path/to/myicon.png?someargs=1'
-			);
-		});
-	});
 	describe('Util', function() {
 		describe('humanFileSize', function() {
 			it('renders file sizes with the correct unit', function() {
@@ -1017,4 +981,3 @@ describe('Core base tests', function() {
 		});
 	});
 });
-
diff --git a/core/routes.php b/core/routes.php
index c473408e2e958576fd52d65a63a529d362ca4954..402277d8f3e6cd1d7ec7fca956ba838aaab31a4f 100644
--- a/core/routes.php
+++ b/core/routes.php
@@ -48,7 +48,6 @@ $application->registerRoutes($this, [
 		['name' => 'login#showLoginForm', 'url' => '/login', 'verb' => 'GET'],
 		['name' => 'login#logout', 'url' => '/logout', 'verb' => 'GET'],
 		['name' => 'token#generateToken', 'url' => '/token/generate', 'verb' => 'POST'],
-		['name' => 'occ#execute', 'url' => '/occ/{command}', 'verb' => 'POST'],
 		['name' => 'TwoFactorChallenge#selectChallenge', 'url' => '/login/selectchallenge', 'verb' => 'GET'],
 		['name' => 'TwoFactorChallenge#showChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'GET'],
 		['name' => 'TwoFactorChallenge#solveChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'POST'],
diff --git a/core/templates/installation.php b/core/templates/installation.php
index a4dbb07834411852ff6e4b2e809c6d21995c615b..f755698863467fb873bcc65f0641d22858a8519c 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -51,13 +51,13 @@ script('core', [
 				autocomplete="off" autocapitalize="off" autocorrect="off" required>
 			<label for="adminpass" class="infield"><?php p($l->t( 'Password' )); ?></label>
 			<input type="checkbox" id="show" name="show">
-			<label for="show" class="svg"></label>
+			<label for="show"></label>
 		</p>
 	</fieldset>
 
 	<?php if(!$_['directoryIsSet'] OR !$_['dbIsSet'] OR count($_['errors']) > 0): ?>
 	<fieldset id="advancedHeader">
-		<legend><a id="showAdvanced"><?php p($l->t( 'Storage & database' )); ?> <img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend>
+		<legend><a id="showAdvanced"><?php p($l->t( 'Storage & database' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend>
 	</fieldset>
 	<?php endif; ?>
 
@@ -161,7 +161,7 @@ script('core', [
 	<div class="buttons"><input type="submit" class="primary" value="<?php p($l->t( 'Finish setup' )); ?>" data-finishing="<?php p($l->t( 'Finishing …' )); ?>"></div>
 
 	<p class="info">
-		<span class="icon-info-white svg"></span>
+		<span class="icon-info-white"></span>
 		<?php p($l->t('Need help?'));?>
 		<a target="_blank" rel="noreferrer" href="<?php p(link_to_docs('admin-install')); ?>"><?php p($l->t('See the documentation'));?> ↗</a>
 	</p>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 985e95294adcf2df153d91071a7ce7fc675ae7d1..5850635315861e26ade0d698a55dc8356e7db8bf 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -31,7 +31,7 @@
 				<?php if ($_['bodyid'] === 'body-login' ): ?>
 					<header role="banner">
 						<div id="header">
-							<div class="logo svg">
+							<div class="logo">
 								<h1 class="hidden-visually">
 									<?php p($theme->getName()); ?>
 								</h1>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index d42a392f40f6209e858373f2e00c2ad9df8298c2..4a6937c6ea0fa8b129608feacab99349aba13128 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -39,7 +39,7 @@
 	<header role="banner"><div id="header">
 			<a href="<?php print_unescaped(link_to('', 'index.php')); ?>"
 				id="owncloud" tabindex="1">
-				<div class="logo-icon svg">
+				<div class="logo-icon">
 					<h1 class="hidden-visually">
 						<?php p($theme->getName()); ?>
 					</h1>
@@ -56,11 +56,11 @@
 						}
 					?>
 				</h1>
-				<div class="icon-caret svg"></div>
+				<div class="icon-caret"></div>
 			</a>
 
 			<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
-			<div id="settings" class="svg">
+			<div id="settings">
 				<div id="expand" tabindex="6" role="link" class="menutoggle">
 					<?php if ($_['enableAvatars']): ?>
 					<div class="avatardiv<?php if ($_['userAvatarSet']) { print_unescaped(' avatardiv-shown'); } else { print_unescaped('" style="display: none'); } ?>">
@@ -73,7 +73,7 @@
 					</div>
 					<?php endif; ?>
 					<span id="expandDisplayName"><?php  p(trim($_['user_displayname']) != '' ? $_['user_displayname'] : $_['user_uid']) ?></span>
-					<img class="svg" alt="" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>">
+					<img alt="" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>">
 				</div>
 				<div id="expanddiv">
 				<ul>
@@ -81,14 +81,14 @@
 					<li>
 						<a href="<?php print_unescaped($entry['href']); ?>"
 							<?php if( $entry["active"] ): ?> class="active"<?php endif; ?>>
-							<img class="svg" alt="" src="<?php print_unescaped($entry['icon']); ?>">
+							<img alt="" src="<?php print_unescaped($entry['icon']); ?>">
 							<?php p($entry['name']) ?>
 						</a>
 					</li>
 				<?php endforeach; ?>
 					<li>
 						<a id="logout" <?php print_unescaped(OC_User::getLogoutAttribute()); ?>>
-							<img class="svg" alt="" src="<?php print_unescaped(image_path('', 'actions/logout.svg')); ?>">
+							<img alt="" src="<?php print_unescaped(image_path('', 'actions/logout.svg')); ?>">
 							<?php p($l->t('Log out'));?>
 						</a>
 					</li>
@@ -100,20 +100,20 @@
 				<label for="searchbox" class="hidden-visually">
 					<?php p($l->t('Search'));?>
 				</label>
-				<input id="searchbox" class="svg" type="search" name="query"
+				<input id="searchbox" type="search" name="query"
 					value="" required
 					autocomplete="off" tabindex="5">
 			</form>
 		</div></header>
 
 		<nav role="navigation"><div id="navigation">
-			<div id="apps" class="svg">
+			<div id="apps">
 				<ul>
 				<?php foreach($_['navigation'] as $entry): ?>
 					<li data-id="<?php p($entry['id']); ?>">
 						<a href="<?php print_unescaped($entry['href']); ?>" tabindex="3"
 							<?php if( $entry['active'] ): ?> class="active"<?php endif; ?>>
-							<img class="app-icon svg" alt="" src="<?php print_unescaped($entry['icon']); ?>">
+							<img class="app-icon" alt="" src="<?php print_unescaped($entry['icon']); ?>">
 							<div class="icon-loading-dark" style="display:none;"></div>
 							<span>
 								<?php p($entry['name']); ?>
@@ -128,7 +128,7 @@
 					<li id="apps-management">
 						<a href="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('settings.AppSettings.viewApps')); ?>" tabindex="4"
 							<?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
-							<img class="app-icon svg" alt="" src="<?php print_unescaped(image_path('settings', 'apps.svg')); ?>">
+							<img class="app-icon" alt="" src="<?php print_unescaped(image_path('settings', 'apps.svg')); ?>">
 							<div class="icon-loading-dark" style="display:none;"></div>
 							<span>
 								<?php p($l->t('Apps')); ?>
diff --git a/core/templates/login.php b/core/templates/login.php
index 5b0fd97cfd86d12347f8a3e7fa7cfe3ef9794f02..95c5a423c3ded3c28fc6e8628a6725e08cc869a5 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -53,7 +53,7 @@ script('core', [
 				<?php p($_['user_autofocus'] ? '' : 'autofocus'); ?>
 				autocomplete="on" autocapitalize="off" autocorrect="off" required>
 			<label for="password" class="infield"><?php p($l->t('Password')); ?></label>
-			<input type="submit" id="submit" class="login primary icon-confirm svg" title="<?php p($l->t('Log in')); ?>" value="" disabled="disabled"/>
+			<input type="submit" id="submit" class="login primary icon-confirm" title="<?php p($l->t('Log in')); ?>" value="" disabled="disabled"/>
 		</p>
 
 		<?php if (!empty($_['invalidpassword']) && !empty($_['canResetPassword'])) { ?>
diff --git a/core/templates/update.admin.php b/core/templates/update.admin.php
index 24b2beec6daceee159ad0c672c3a34c4fdb0b3c6..87f93967d910559c62ffcc5941d667b550513693 100644
--- a/core/templates/update.admin.php
+++ b/core/templates/update.admin.php
@@ -47,7 +47,7 @@
 		<p id="update-progress-message-error" class="warning hidden"></p>
 		<ul id="update-progress-message-warnings" class="warning hidden"></ul>
 		<p id="update-progress-message"></p>
-		<a class="update-show-detailed"><?php p($l->t( 'Detailed logs' )); ?> <img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a>
+		<a class="update-show-detailed"><?php p($l->t( 'Detailed logs' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a>
 		<div id="update-progress-detailed" class="hidden warning"></div>
 	</div>
 </div>
diff --git a/lib/base.php b/lib/base.php
index dde8e38218afd948adef09d1e882c9ea09a0052f..70fac6d707bc4c54b69ecddcac12e6edbb8d64b7 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -49,8 +49,6 @@
  *
  */
 
-use OCP\IRequest;
-
 require_once 'public/Constants.php';
 
 /**
@@ -273,20 +271,9 @@ class OC {
 		}
 	}
 
-	/**
-	 * Limit maintenance mode access
-	 * @param IRequest $request
-	 */
-	public static function checkMaintenanceMode(IRequest $request) {
-		// Check if requested URL matches 'index.php/occ'
-		$isOccControllerRequested = preg_match('|/index\.php$|', $request->getScriptName()) === 1
-				&& strpos($request->getPathInfo(), '/occ/') === 0;
+	public static function checkMaintenanceMode() {
 		// Allow ajax update script to execute without being stopped
-		if (
-			\OC::$server->getSystemConfig()->getValue('maintenance', false)
-			&& OC::$SUBURI != '/core/ajax/update.php'
-			&& !$isOccControllerRequested
-		) {
+		if (\OC::$server->getSystemConfig()->getValue('maintenance', false) && OC::$SUBURI != '/core/ajax/update.php') {
 			// send http status 503
 			header('HTTP/1.1 503 Service Temporarily Unavailable');
 			header('Status: 503 Service Temporarily Unavailable');
@@ -835,7 +822,7 @@ class OC {
 		$request = \OC::$server->getRequest();
 		$requestPath = $request->getRawPathInfo();
 		if (substr($requestPath, -3) !== '.js') { // we need these files during the upgrade
-			self::checkMaintenanceMode($request);
+			self::checkMaintenanceMode();
 			self::checkUpgrade();
 		}
 
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php
index 8a9191a4c53691cb1f580790c0f03188e111e188..ec91064278e3cec39a1284b37357385e5992aec0 100644
--- a/lib/private/Console/Application.php
+++ b/lib/private/Console/Application.php
@@ -138,10 +138,9 @@ class Application {
 	 * @throws \Exception
 	 */
 	public function run(InputInterface $input = null, OutputInterface $output = null) {
-		$args = isset($this->request->server['argv']) ? $this->request->server['argv'] : [];
 		$this->dispatcher->dispatch(ConsoleEvent::EVENT_RUN, new ConsoleEvent(
 			ConsoleEvent::EVENT_RUN,
-			$args
+			$this->request->server['argv']
 		));
 		return $this->application->run($input, $output);
 	}
diff --git a/lib/private/Files/Type/Detection.php b/lib/private/Files/Type/Detection.php
index 6191eae2754f6669fa345e13010f381e057f848f..2d68c92b14efb6e369d9ac1f6c1541b0950fb8af 100644
--- a/lib/private/Files/Type/Detection.php
+++ b/lib/private/Files/Type/Detection.php
@@ -283,21 +283,21 @@ class Detection implements IMimeTypeDetector {
 
 		// Is it a dir?
 		if ($mimetype === 'dir') {
-			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder.png');
+			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder.svg');
 			return $this->mimetypeIcons[$mimetype];
 		}
 		if ($mimetype === 'dir-shared') {
-			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-shared.png');
+			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-shared.svg');
 			return $this->mimetypeIcons[$mimetype];
 		}
 		if ($mimetype === 'dir-external') {
-			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-external.png');
+			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-external.svg');
 			return $this->mimetypeIcons[$mimetype];
 		}
 
 		// Icon exists?
 		try {
-			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $icon . '.png');
+			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $icon . '.svg');
 			return $this->mimetypeIcons[$mimetype];
 		} catch (\RuntimeException $e) {
 			// Specified image not found
@@ -306,13 +306,13 @@ class Detection implements IMimeTypeDetector {
 		// Try only the first part of the filetype
 		$mimePart = substr($icon, 0, strpos($icon, '-'));
 		try {
-			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $mimePart . '.png');
+			$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $mimePart . '.svg');
 			return $this->mimetypeIcons[$mimetype];
 		} catch (\RuntimeException $e) {
 			// Image for the first part of the mimetype not found
 		}
 
-		$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/file.png');
+		$this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/file.svg');
 		return $this->mimetypeIcons[$mimetype];
 	}
 }
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 31549c93cb2756d6b02baea6fd02e7caf75ea006..7d9771e6394ddcf3b4bed3852452678e3d57f48e 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1980,7 +1980,7 @@ class View {
 		$mount = $this->getMountForLock($absolutePath, $lockMountPoint);
 		if ($mount) {
 			$storage = $mount->getStorage();
-			if ($storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
+			if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
 				$storage->releaseLock(
 					$mount->getInternalPath($absolutePath),
 					$type,
diff --git a/lib/private/Preview/MP3.php b/lib/private/Preview/MP3.php
index 8b1a0500538f5e821779e8630f836d2bf9e599e2..f96b422f57ada7bf1d2b86a5747e31bc7639ab60 100644
--- a/lib/private/Preview/MP3.php
+++ b/lib/private/Preview/MP3.php
@@ -68,7 +68,7 @@ class MP3 extends Provider {
 	 * @return bool|\OCP\IImage false if the default image is missing or invalid
 	 */
 	private function getNoCoverThumbnail() {
-		$icon = \OC::$SERVERROOT . '/core/img/filetypes/audio.png';
+		$icon = \OC::$SERVERROOT . '/core/img/filetypes/audio.svg';
 
 		if(!file_exists($icon)) {
 			return false;
diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php
index 3e32582025f5968298000dbe9d7c4b9e7fceace7..7055fafbf2482c0254bd13f4a96a968eb16bf795 100644
--- a/lib/private/SystemTag/SystemTagManager.php
+++ b/lib/private/SystemTag/SystemTagManager.php
@@ -140,7 +140,10 @@ class SystemTagManager implements ISystemTagManager {
 
 		if (!empty($nameSearchPattern)) {
 			$query->andWhere(
-				$query->expr()->like('name', $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern) . '%'))
+				$query->expr()->like(
+					'name',
+					$query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern). '%')
+				)
 			);
 		}
 
diff --git a/public.php b/public.php
index b7125502ee83bfcdd2085b1c9c5e0689a4dc4557..964ed03c1aaedbe4a00bf954453dc9a93e339890 100644
--- a/public.php
+++ b/public.php
@@ -35,9 +35,9 @@ try {
 		exit;
 	}
 
-	$request = \OC::$server->getRequest();
-	OC::checkMaintenanceMode($request);
+	OC::checkMaintenanceMode();
 	OC::checkSingleUserMode(true);
+	$request = \OC::$server->getRequest();
 	$pathInfo = $request->getPathInfo();
 
 	if (!$pathInfo && $request->getParam('service', '') === '') {
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php
index db2db6e5bfc70241e1aa25ced4c3cd939d6da45a..e7fc2d916bca3f1c716f6d6a3b3c1ed51340412b 100644
--- a/settings/Controller/AuthSettingsController.php
+++ b/settings/Controller/AuthSettingsController.php
@@ -81,7 +81,28 @@ class AuthSettingsController extends Controller {
 		if (is_null($user)) {
 			return [];
 		}
-		return $this->tokenProvider->getTokenByUser($user);
+		$tokens = $this->tokenProvider->getTokenByUser($user);
+		
+		try {
+			$sessionId = $this->session->getId();
+		} catch (SessionNotAvailableException $ex) {
+			return $this->getServiceNotAvailableResponse();
+		}
+		try {
+			$sessionToken = $this->tokenProvider->getToken($sessionId);
+		} catch (InvalidTokenException $ex) {
+			return $this->getServiceNotAvailableResponse();
+		}
+
+		return array_map(function(IToken $token) use ($sessionToken) {
+			$data = $token->jsonSerialize();
+			if ($sessionToken->getId() === $token->getId()) {
+				$data['canDelete'] = false;
+			} else {
+				$data['canDelete'] = true;
+			}
+			return $data;
+		}, $tokens);
 	}
 
 	/**
@@ -94,9 +115,7 @@ class AuthSettingsController extends Controller {
 		try {
 			$sessionId = $this->session->getId();
 		} catch (SessionNotAvailableException $ex) {
-			$resp = new JSONResponse();
-			$resp->setStatus(Http::STATUS_SERVICE_UNAVAILABLE);
-			return $resp;
+			return $this->getServiceNotAvailableResponse();
 		}
 
 		try {
@@ -108,9 +127,7 @@ class AuthSettingsController extends Controller {
 				$password = null;
 			}
 		} catch (InvalidTokenException $ex) {
-			$resp = new JSONResponse();
-			$resp->setStatus(Http::STATUS_SERVICE_UNAVAILABLE);
-			return $resp;
+			return $this->getServiceNotAvailableResponse();
 		}
 
 		$token = $this->generateRandomDeviceToken();
@@ -123,6 +140,12 @@ class AuthSettingsController extends Controller {
 		];
 	}
 
+	private function getServiceNotAvailableResponse() {
+		$resp = new JSONResponse();
+		$resp->setStatus(Http::STATUS_SERVICE_UNAVAILABLE);
+		return $resp;
+	}
+
 	/**
 	 * Return a 20 digit device password
 	 *
diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js
index 01fc1b2ea343c7b56fdfc54dab58810f85eea93d..472b841c2302fe3739be888c6b69c0ce8cb9e343 100644
--- a/settings/js/authtoken_view.js
+++ b/settings/js/authtoken_view.js
@@ -29,7 +29,11 @@
 		'<tr data-id="{{id}}">'
 		+ '<td class="has-tooltip" title="{{name}}"><span class="token-name">{{name}}</span></td>'
 		+ '<td><span class="last-activity has-tooltip" title="{{lastActivityTime}}">{{lastActivity}}</span></td>'
+		+ '{{#if canDelete}}'
 		+ '<td><a class="icon-delete has-tooltip" title="' + t('core', 'Disconnect') + '"></a></td>'
+		+ '{{else}}'
+		+ '<td></td>'
+		+ '{{/if}}'
 		+ '<tr>';
 
 	var SubView = OC.Backbone.View.extend({
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index e0fccbd953990e971ef6f0f4aa5fff1fd0aaa79c..e0fdea64773d7f51436554181a1e9d66327be00e 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -117,7 +117,7 @@ var UserList = {
 		 * remove action
 		 */
 		if ($tr.find('td.remove img').length === 0 && OC.currentUser !== user.name) {
-			var deleteImage = $('<img class="svg action">').attr({
+			var deleteImage = $('<img class="action">').attr({
 				src: OC.imagePath('core', 'actions/delete')
 			});
 			var deleteLink = $('<a class="action delete">')
@@ -138,10 +138,13 @@ var UserList = {
 				.find('option').attr('selected', null)
 				.first().attr('selected', 'selected');
 		} else {
-			if ($quotaSelect.find('option').filterAttr('value', user.quota).length > 0) {
-				$quotaSelect.find('option').filterAttr('value', user.quota).attr('selected', 'selected');
+			var $options = $quotaSelect.find('option');
+			var $foundOption = $options.filterAttr('value', user.quota);
+			if ($foundOption.length > 0) {
+				$foundOption.attr('selected', 'selected');
 			} else {
-				$quotaSelect.append('<option value="' + escapeHTML(user.quota) + '" selected="selected">' + escapeHTML(user.quota) + '</option>');
+				// append before "Other" entry
+				$options.last().before('<option value="' + escapeHTML(user.quota) + '" selected="selected">' + escapeHTML(user.quota) + '</option>');
 			}
 		}
 
@@ -576,6 +579,15 @@ var UserList = {
 		var $select = $(ev.target);
 		var uid = UserList.getUID($select);
 		var quota = $select.val();
+		if (quota === 'other') {
+			return;
+		}
+		if (isNaN(parseInt(quota, 10)) || parseInt(quota, 10) < 0) {
+			// the select component has added the bogus value, delete it again
+			$select.find('option[selected]').remove();
+			OC.Notification.showTemporary(t('core', 'Invalid quota value "{val}"', {val: quota}));
+			return;
+		}
 		UserList._updateQuota(uid, quota, function(returnedQuota){
 			if (quota !== returnedQuota) {
 				$select.find(':selected').text(returnedQuota);
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index c0a7424cf676f66b85c01b50b87c34264f97fbc9..f41c0d3c1010d64c0ae85b9ea0cd39c58359e76f 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -202,7 +202,7 @@ if ($_['cronErrors']) {
 
 	<div class="section" id="shareAPI">
 		<h2><?php p($l->t('Sharing'));?></h2>
-		<a target="_blank"  el="noreferrer" class="icon-info svg"
+		<a target="_blank"  el="noreferrer" class="icon-info"
 			title="<?php p($l->t('Open documentation'));?>"
 			href="<?php p(link_to_docs('admin-sharing')); ?>"></a>
 		<p id="enable">
@@ -314,7 +314,7 @@ if ($_['cronErrors']) {
 		endif; ?>
 	</p>
 	<?php endif; ?>
-	<a target="_blank" rel="noreferrer" class="icon-info svg"
+	<a target="_blank" rel="noreferrer" class="icon-info"
 		title="<?php p($l->t('Open documentation'));?>"
 		href="<?php p(link_to_docs('admin-background-jobs')); ?>"></a>
 
@@ -346,7 +346,7 @@ if ($_['cronErrors']) {
 
 <div class="section" id='encryptionAPI'>
 	<h2><?php p($l->t('Server-side encryption')); ?></h2>
-	<a target="_blank" rel="noreferrer" class="icon-info svg"
+	<a target="_blank" rel="noreferrer" class="icon-info"
 		title="<?php p($l->t('Open documentation'));?>"
 		href="<?php p(link_to_docs('admin-encryption')); ?>"></a>
 
@@ -412,7 +412,7 @@ if ($_['cronErrors']) {
 <div class="section" id="mail_general_settings">
 	<form id="mail_general_settings_form" class="mail_settings">
 		<h2><?php p($l->t('Email server'));?></h2>
-		<a target="_blank" rel="noreferrer" class="icon-info svg"
+		<a target="_blank" rel="noreferrer" class="icon-info"
 			title="<?php p($l->t('Open documentation'));?>"
 			href="<?php p(link_to_docs('admin-email')); ?>"></a>
 
diff --git a/settings/templates/certificates.php b/settings/templates/certificates.php
index c1ccdcaef952510a1c6e71c266aa574055b151af..16f8dda31ad6191f95f23f1be1e48ac34a8b0afc 100644
--- a/settings/templates/certificates.php
+++ b/settings/templates/certificates.php
@@ -26,7 +26,7 @@
 					<?php else: ?>style="visibility:hidden;"
 					<?php endif; ?>><img alt="<?php p($l->t('Delete')); ?>"
 										 title="<?php p($l->t('Delete')); ?>"
-										 class="svg action"
+										 class="action"
 										 src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>"/>
 				</td>
 			</tr>
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index bcc803938bade940b55b15c559c3185ad246b743..2f656d39fbb50f9620242baab109b7f575da5477 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -39,9 +39,9 @@
 		<div class="avatardiv"></div>
 		<div class="warning hidden"></div>
 		<?php if ($_['avatarChangeSupported']): ?>
-		<label for="uploadavatar" class="inlineblock button icon-upload svg" id="uploadavatarbutton" title="<?php p($l->t('Upload new')); ?>"></label>
-		<div class="inlineblock button icon-folder svg" id="selectavatar" title="<?php p($l->t('Select from Files')); ?>"></div>
-		<div class="hidden button icon-delete svg" id="removeavatar" title="<?php p($l->t('Remove image')); ?>"></div>
+		<label for="uploadavatar" class="inlineblock button icon-upload" id="uploadavatarbutton" title="<?php p($l->t('Upload new')); ?>"></label>
+		<div class="inlineblock button icon-folder" id="selectavatar" title="<?php p($l->t('Select from Files')); ?>"></div>
+		<div class="hidden button icon-delete" id="removeavatar" title="<?php p($l->t('Remove image')); ?>"></div>
 		<input type="file" name="files[]" id="uploadavatar" class="hiddenuploadfield">
 		<p><em><?php p($l->t('png or jpg, max. 20 MB')); ?></em></p>
 		<?php else: ?>
@@ -129,7 +129,7 @@ if($_['passwordChangeSupported']) {
 		placeholder="<?php echo $l->t('New password');?>"
 		data-typetoggle="#personal-show"
 		autocomplete="off" autocapitalize="off" autocorrect="off" />
-	<input type="checkbox" id="personal-show" name="show" /><label for="personal-show" class="svg"></label>
+	<input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label>
 	<input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" />
 	<br/>
 </form>
diff --git a/settings/templates/users/part.grouplist.php b/settings/templates/users/part.grouplist.php
index cd6ac4a1e899a8c8d8cb10efb2f205ac48b8ad81..64c602c364c85be9dbb051d400d813427844765e 100644
--- a/settings/templates/users/part.grouplist.php
+++ b/settings/templates/users/part.grouplist.php
@@ -8,7 +8,7 @@
 	<li id="newgroup-form" style="display: none">
 		<form>
 			<input type="text" id="newgroupname" placeholder="<?php p($l->t('Group')); ?>..." />
-			<input type="submit" class="button icon-add svg" value="" />
+			<input type="submit" class="button icon-add" value="" />
 		</form>
 	</li>
 	<!-- Everyone -->
@@ -45,7 +45,7 @@
 				<span class="usercount"><?php if($group['usercount'] > 0) { p($group['usercount']); } ?></span>
 				<?php if($_['isAdmin']): ?>
 				<a href="#" class="action delete" original-title="<?php p($l->t('Delete'))?>">
-					<img src="<?php print_unescaped(image_path('core', 'actions/delete.svg')) ?>" class="svg" />
+					<img src="<?php print_unescaped(image_path('core', 'actions/delete.svg')) ?>" />
 				</a>
 				<?php endif; ?>
 			</span>
diff --git a/settings/templates/users/part.userlist.php b/settings/templates/users/part.userlist.php
index 697d0f3f1428d9a4ec585ff1334e29a189279276..c7b2ad58c153a743d58513426ddbfdd9de59b080 100644
--- a/settings/templates/users/part.userlist.php
+++ b/settings/templates/users/part.userlist.php
@@ -26,15 +26,15 @@
 			<td class="avatar"><div class="avatardiv"></div></td>
 		<?php endif; ?>
 			<th class="name" scope="row"></th>
-			<td class="displayName"><span></span> <img class="svg action"
+			<td class="displayName"><span></span> <img class="action"
 				src="<?php p(image_path('core', 'actions/rename.svg'))?>"
 				alt="<?php p($l->t("change full name"))?>" title="<?php p($l->t("change full name"))?>"/>
 			</td>
-			<td class="password"><span>●●●●●●●</span> <img class="svg action"
+			<td class="password"><span>●●●●●●●</span> <img class="action"
 				src="<?php print_unescaped(image_path('core', 'actions/rename.svg'))?>"
 				alt="<?php p($l->t("set new password"))?>" title="<?php p($l->t("set new password"))?>"/>
 			</td>
-			<td class="mailAddress"><span></span><div class="loading-small hidden"></div> <img class="svg action"
+			<td class="mailAddress"><span></span><div class="loading-small hidden"></div> <img class="action"
 				src="<?php p(image_path('core', 'actions/rename.svg'))?>"
 				alt="<?php p($l->t('change email address'))?>" title="<?php p($l->t('change email address'))?>"/>
 			</td>
diff --git a/tests/Core/Controller/OccControllerTest.php b/tests/Core/Controller/OccControllerTest.php
deleted file mode 100644
index 682d9170096b0423113400edb1c85ff1d64503aa..0000000000000000000000000000000000000000
--- a/tests/Core/Controller/OccControllerTest.php
+++ /dev/null
@@ -1,143 +0,0 @@
-<?php
-/**
- * @author Victor Dubiniuk <dubiniuk@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program.  If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace Tests\Core\Controller;
-
-use OC\Console\Application;
-use OC\Core\Controller\OccController;
-use OCP\IConfig;
-use Symfony\Component\Console\Output\Output;
-use Test\TestCase;
-
-/**
- * Class OccControllerTest
- *
- * @package OC\Core\Controller
- */
-class OccControllerTest extends TestCase {
-
-	const TEMP_SECRET = 'test';
-
-	/** @var \OC\AppFramework\Http\Request | \PHPUnit_Framework_MockObject_MockObject */
-	private $request;
-	/** @var  \OC\Core\Controller\OccController | \PHPUnit_Framework_MockObject_MockObject */
-	private $controller;
-	/** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
-	private $config;
-	/** @var  Application | \PHPUnit_Framework_MockObject_MockObject */
-	private $console;
-
-	public function testFromInvalidLocation(){
-		$this->getControllerMock('example.org');
-
-		$response = $this->controller->execute('status', '');
-		$responseData = $response->getData();
-
-		$this->assertArrayHasKey('exitCode', $responseData);
-		$this->assertEquals(126, $responseData['exitCode']);
-
-		$this->assertArrayHasKey('details', $responseData);
-		$this->assertEquals('Web executor is not allowed to run from a different host', $responseData['details']);
-	}
-
-	public function testNotWhiteListedCommand(){
-		$this->getControllerMock('localhost');
-
-		$response = $this->controller->execute('missing_command', '');
-		$responseData = $response->getData();
-
-		$this->assertArrayHasKey('exitCode', $responseData);
-		$this->assertEquals(126, $responseData['exitCode']);
-
-		$this->assertArrayHasKey('details', $responseData);
-		$this->assertEquals('Command "missing_command" is not allowed to run via web request', $responseData['details']);
-	}
-
-	public function testWrongToken(){
-		$this->getControllerMock('localhost');
-
-		$response = $this->controller->execute('status', self::TEMP_SECRET . '-');
-		$responseData = $response->getData();
-
-		$this->assertArrayHasKey('exitCode', $responseData);
-		$this->assertEquals(126, $responseData['exitCode']);
-
-		$this->assertArrayHasKey('details', $responseData);
-		$this->assertEquals('updater.secret does not match the provided token', $responseData['details']);
-	}
-
-	public function testSuccess(){
-		$this->getControllerMock('localhost');
-		$this->console->expects($this->once())->method('run')
-			->willReturnCallback(
-				function ($input, $output) {
-					/** @var Output $output */
-					$output->writeln('{"installed":true,"version":"9.1.0.8","versionstring":"9.1.0 beta 2","edition":""}');
-					return 0;
-				}
-			);
-
-		$response = $this->controller->execute('status', self::TEMP_SECRET, ['--output'=>'json']);
-		$responseData = $response->getData();
-
-		$this->assertArrayHasKey('exitCode', $responseData);
-		$this->assertEquals(0, $responseData['exitCode']);
-
-		$this->assertArrayHasKey('response', $responseData);
-		$decoded = json_decode($responseData['response'], true);
-
-		$this->assertArrayHasKey('installed', $decoded);
-		$this->assertEquals(true, $decoded['installed']);
-	}
-
-	private function getControllerMock($host){
-		$this->request = $this->getMockBuilder('OC\AppFramework\Http\Request')
-			->setConstructorArgs([
-				['server' => []],
-				\OC::$server->getSecureRandom(),
-				\OC::$server->getConfig()
-			])
-			->setMethods(['getRemoteAddress'])
-			->getMock();
-
-		$this->request->expects($this->any())->method('getRemoteAddress')
-			->will($this->returnValue($host));
-
-		$this->config = $this->getMockBuilder('\OCP\IConfig')
-			->disableOriginalConstructor()
-			->getMock();
-		$this->config->expects($this->any())->method('getSystemValue')
-			->with('updater.secret')
-			->willReturn(password_hash(self::TEMP_SECRET, PASSWORD_DEFAULT));
-
-		$this->console = $this->getMockBuilder('\OC\Console\Application')
-			->disableOriginalConstructor()
-			->getMock();
-
-		$this->controller = new OccController(
-			'core',
-			$this->request,
-			$this->config,
-			$this->console
-		);
-	}
-
-}
diff --git a/tests/Settings/Controller/AuthSettingsControllerTest.php b/tests/Settings/Controller/AuthSettingsControllerTest.php
index ee67b221022b1e22d3f528dc34011c3053b445ca..1705cb5ddf195e0a24d7021fcd6c24b45073f031 100644
--- a/tests/Settings/Controller/AuthSettingsControllerTest.php
+++ b/tests/Settings/Controller/AuthSettingsControllerTest.php
@@ -24,6 +24,7 @@ namespace Test\Settings\Controller;
 
 use OC\AppFramework\Http;
 use OC\Authentication\Exceptions\InvalidTokenException;
+use OC\Authentication\Token\DefaultToken;
 use OC\Authentication\Token\IToken;
 use OC\Settings\Controller\AuthSettingsController;
 use OCP\AppFramework\Http\JSONResponse;
@@ -56,10 +57,17 @@ class AuthSettingsControllerTest extends TestCase {
 	}
 
 	public function testIndex() {
-		$result = [
-			'token1',
-			'token2',
+		$token1 = new DefaultToken();
+		$token1->setId(100);
+		$token2 = new DefaultToken();
+		$token2->setId(200);
+		$tokens = [
+			$token1,
+			$token2,
 		];
+		$sessionToken = new DefaultToken();
+		$sessionToken->setId(100);
+
 		$this->userManager->expects($this->once())
 			->method('get')
 			->with($this->uid)
@@ -67,9 +75,31 @@ class AuthSettingsControllerTest extends TestCase {
 		$this->tokenProvider->expects($this->once())
 			->method('getTokenByUser')
 			->with($this->user)
-			->will($this->returnValue($result));
+			->will($this->returnValue($tokens));
+		$this->session->expects($this->once())
+			->method('getId')
+			->will($this->returnValue('session123'));
+		$this->tokenProvider->expects($this->once())
+			->method('getToken')
+			->with('session123')
+			->will($this->returnValue($sessionToken));
 
-		$this->assertEquals($result, $this->controller->index());
+		$this->assertEquals([
+			[
+				'id' => 100,
+				'name' => null,
+				'lastActivity' => null,
+				'type' => null,
+				'canDelete' => false,
+			],
+			[
+				'id' => 200,
+				'name' => null,
+				'lastActivity' => null,
+				'type' => null,
+				'canDelete' => true,
+			]
+		], $this->controller->index());
 	}
 
 	public function testCreate() {
@@ -107,6 +137,7 @@ class AuthSettingsControllerTest extends TestCase {
 		$expected = [
 			'token' => $newToken,
 			'deviceToken' => $deviceToken,
+			'loginName' => 'User13',
 		];
 		$this->assertEquals($expected, $this->controller->create($name));
 	}
diff --git a/tests/Settings/Controller/LogSettingsControllerTest.php b/tests/Settings/Controller/LogSettingsControllerTest.php
index e3cfa072d08c1c1767fdcd3aa68e7ed653ef354e..f296df9903ca69f53cbe02744af45fd9fd20f62e 100644
--- a/tests/Settings/Controller/LogSettingsControllerTest.php
+++ b/tests/Settings/Controller/LogSettingsControllerTest.php
@@ -71,9 +71,9 @@ class LogSettingsControllerTest extends \Test\TestCase {
 	public function testDownload() {
 		$response = $this->logSettingsController->download();
 
-		$expected = new StreamResponse(\OC\Log\Owncloud::getLogFilePath());
-		$expected->addHeader('Content-Type', 'application/octet-stream');
-		$expected->addHeader('Content-Disposition', 'attachment; filename="nextcloud.log"');
-		$this->assertEquals($expected, $response);
+		$this->assertInstanceOf('\OCP\AppFramework\Http\StreamResponse', $response);
+		$headers = $response->getHeaders();
+		$this->assertEquals('application/octet-stream', $headers['Content-Type']);
+		$this->assertEquals('attachment; filename="nextcloud.log"', $headers['Content-Disposition']);
 	}
 }
diff --git a/tests/objectstore/start-swift-ceph.sh b/tests/objectstore/start-swift-ceph.sh
index 089aab6a6487a12afd153b71a1608cf5aa79b82e..bbf483c28970b16df7e3dd9a48a7f5b9878d7db6 100755
--- a/tests/objectstore/start-swift-ceph.sh
+++ b/tests/objectstore/start-swift-ceph.sh
@@ -30,6 +30,7 @@ thisFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 # create readiness notification socket
 notify_sock=$(readlink -f "$thisFolder"/dockerContainerCeph.$EXECUTOR_NUMBER.swift.sock)
+rm -f "$notify_sock" # in case an unfinished test left one behind
 mkfifo "$notify_sock"
 
 port=5034
@@ -67,7 +68,13 @@ if [[ $ready != 'READY=1' ]]; then
     docker logs $container
     exit 1
 fi
-sleep 1
+if ! "$thisFolder"/wait-for-connection ${host} 80 600; then
+    echo "[ERROR] Waited 600 seconds, no response" >&2
+    docker logs $container
+    exit 1
+fi
+echo "Waiting another 15 seconds"
+sleep 15
 
 cat > $thisFolder/swift.config.php <<DELIM
 <?php
@@ -101,5 +108,7 @@ if [ -n "$DEBUG" ]; then
     cat $thisFolder/swift.config.php
     echo "### contents of $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift"
     cat $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift
+    echo "### docker logs"
+    docker logs $container
     echo "############## DEBUG info end ###########"
 fi
diff --git a/tests/objectstore/wait-for-connection b/tests/objectstore/wait-for-connection
new file mode 100755
index 0000000000000000000000000000000000000000..2c480fb733e610790aff3a2e9a8bc93ed56dd805
--- /dev/null
+++ b/tests/objectstore/wait-for-connection
@@ -0,0 +1,45 @@
+#!/usr/bin/php
+<?php
+
+$timeout = 60;
+
+switch ($argc) {
+case 4:
+	$timeout = (float)$argv[3];
+case 3:
+	$host = $argv[1];
+	$port = (int)$argv[2];
+	break;
+default:
+	fwrite(STDERR, 'Usage: '.$argv[0].' host port [timeout]'."\n");
+	exit(2);
+}
+
+if ($timeout < 0) {
+	fwrite(STDERR, 'Timeout must be greater than zero'."\n");
+	exit(2);
+}
+if ($port < 1) {
+	fwrite(STDERR, 'Port must be an integer greater than zero'."\n");
+	exit(2);
+}
+
+$socketTimeout = (float)ini_get('default_socket_timeout');
+if ($socketTimeout > $timeout) {
+	$socketTimeout = $timeout;
+}
+
+$stopTime = time() + $timeout;
+do {
+	$sock = @fsockopen($host, $port, $errno, $errstr, $socketTimeout);
+	if ($sock !== false) {
+		fclose($sock);
+		fwrite(STDOUT, "\n");
+		exit(0);
+	}
+	sleep(1);
+	fwrite(STDOUT, '.');
+} while (time() < $stopTime);
+
+fwrite(STDOUT, "\n");
+exit(1);