Server: Apps with .htaccess file sometimes do not pass the integrity check

Created on 6 Jun 2018  路  4Comments  路  Source: nextcloud/server

  • having an app with an .htaccess file
  • having a signature in this app
  • install the app via appstore
  • expected: signature passes
  • actual: signature does not pass, because this .htaccess file is missing

We think that this is causes by the NC code do not allow to write .htaccess files in the apps.

See https://github.com/nextcloud/news/issues/297

bug apps management

Most helpful comment

I did some testing and digging and found the problem:
The file is ignored after extraction the extraction dir still contains the .htaccessfiles but after copyr the files are gone. This is caused by a blacklist check:
https://github.com/nextcloud/server/blob/master/lib/private/legacy/helper.php#L191
.htaccess is returned:
https://github.com/nextcloud/server/blob/master/lib/private/Files/Filesystem.php#L620

I guess .htaccess is blacklisted for a good reason and we can't simply remove it.

All 4 comments

cc @rullzer @blizzz @ChristophWurst

It seems that the file is actually in the archive, but does not get properly extracted :/

I did some testing and digging and found the problem:
The file is ignored after extraction the extraction dir still contains the .htaccessfiles but after copyr the files are gone. This is caused by a blacklist check:
https://github.com/nextcloud/server/blob/master/lib/private/legacy/helper.php#L191
.htaccess is returned:
https://github.com/nextcloud/server/blob/master/lib/private/Files/Filesystem.php#L620

I guess .htaccess is blacklisted for a good reason and we can't simply remove it.

@Grotax Thanks - and suddenly all makes sense. So the approach by @rullzer was the correct one - it should simply not be packaged: https://github.com/nextcloud/news/pull/347

Thanks again for this finding. 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

georgehrke picture georgehrke  路  3Comments

MariusBluem picture MariusBluem  路  3Comments

mfechner picture mfechner  路  3Comments

Django-BOfH picture Django-BOfH  路  3Comments

williambargent picture williambargent  路  3Comments