we can only close the session if encryption is not used
Merge pull request #10238 from owncloud/fix-public-download-with-encryption-master

we can only close the session if encryption is not used