backport of #4360
Merge pull request #4634 from owncloud/backport-4360-stable5

Backport 4360 stable5