diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php
index 93be6691f96bbc0d0e6db2db632f7b8a1357782a..ef18b924dd8175c8279da7074a41f3ab3186a12d 100644
--- a/apps/files_encryption/lib/session.php
+++ b/apps/files_encryption/lib/session.php
@@ -100,6 +100,8 @@ class Session {
 			$privateKey = Crypt::decryptPrivateKey($encryptedKey, '');
 			$this->setPublicSharePrivateKey($privateKey);
 
+			$this->setInitialized(\OCA\Encryption\Session::INIT_SUCCESSFUL);
+
 			\OC_FileProxy::$enabled = $proxyStatus;
 		}
 	}
diff --git a/apps/files_sharing/lib/connector/publicauth.php b/apps/files_sharing/lib/connector/publicauth.php
index ec7b68ba69ce2eddebbd6c5afcad0b30cf388540..c9d545180b31c239501d377c9eba0c51370ab18c 100644
--- a/apps/files_sharing/lib/connector/publicauth.php
+++ b/apps/files_sharing/lib/connector/publicauth.php
@@ -38,6 +38,7 @@ class PublicAuth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
 	 */
 	protected function validateUserPass($username, $password) {
 		$linkItem = \OCP\Share::getShareByToken($username, false);
+		\OC_User::setIncognitoMode(true);
 		$this->share = $linkItem;
 		if (!$linkItem) {
 			return false;