nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.63k stars 3.99k forks source link

Integrity check fails for core/js/mimetypelist.js after upgrade to NC 20 beta 2 #22508

Closed Nils160988 closed 3 years ago

Nils160988 commented 4 years ago

How to use GitHub

Steps to reproduce

Upgrade to NC 20 beta 2

Expected behaviour

No failures in integrity check (as with NC 19)

Actual behaviour

The integrity check reports an error for file core/js/mimetypelist.js (see signing status below). Probably, it has been forgotten to update the hash.

Edit: Just found out about (already closed) issue https://github.com/nextcloud/server/issues/22409 which seems related.

Server configuration detail

Operating system: Linux 4.15.0 #1 SMP Tue Jun 9 12:58:54 MSK 2020 x86_64

Webserver: Apache/2.4.29 (Ubuntu) (apache2handler)

Database: mysql 10.1.44

PHP version:

7.2.24-0ubuntu0.18.04.6 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, apache2handler, mysqlnd, PDO, xml, apcu, apc, bcmath, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, intl, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 20.0.0 Beta 2 - 20.0.0.4

Updated from an older Nextcloud/ownCloud or fresh install: updated

Where did you install Nextcloud from: zip package

Signing status Array ( [core] => Array ( [INVALID_HASH] => Array ( [core/js/mimetypelist.js] => Array ( [expected] => 23a3fa45757b26795f5cf8f94d9e5bce76fc916288a6458679311b312c167adcf4158ccb2c5c3db791fa0b87703b6c5863afb6c9d790b8cbac5ab3ae8c3418fb [current] => 248b1c46827f16075a92457d368b5f8c1c6d39c8dc8569e248b35443ac035501b86b8f46785cc6fb3f12fc8445284829c1e27aa82097a53d2688040b1de7da26 ) ) ) )
List of activated apps ``` Enabled: - accessibility: 1.6.0 - activity: 2.13.1 - cloud_federation_api: 1.3.0 - cms_pico: 1.0.9 - comments: 1.10.0 - contactsinteraction: 1.1.0 - dashboard: 7.0.0 - dav: 1.16.0 - deck: 1.0.5 - event_update_notification: 1.1.0 - external: 3.6.0 - federatedfilesharing: 1.10.1 - federation: 1.10.1 - files: 1.15.0 - files_pdfviewer: 2.0.O - files_rightclick: 0.17.0 - files_sharing: 1.12.0 - files_trashbin: 1.10.1 - files_versions: 1.13.0 - files_videoplayer: 1.9.0 - firstrunwizard: 2.9.0 - issuetemplate: 0.6.0 - logreader: 2.5.0 - lookup_server_connector: 1.8.0 - mail: 1.4.1 - nextcloud_announcements: 1.9.0 - notes: 3.6.4 - notifications: 2.8.0 - oauth2: 1.8.0 - password_policy: 1.10.1 - photos: 1.2.0 - privacy: 1.4.0 - provisioning_api: 1.10.0 - recommendations: 0.8.0 - richdocuments: 3.7.3 - richdocumentscode: 4.2.602 - serverinfo: 1.10.0 - settings: 1.2.0 - sharebymail: 1.10.0 - spreed: 10.0.0-beta.1 - systemtags: 1.10.0 - tasks: 0.13.3 - text: 3.1.0 - theming: 1.11.0 - twofactor_backupcodes: 1.9.0 - twofactor_totp: 5.0.0 - updatenotification: 1.10.0 - user_status: 0.0.2 - viewer: 1.4.0 - weather_status: 1.0.0 - workflowengine: 2.2.0 Disabled: - admin_audit - announcementcenter - apporder - calendar - circles - contacts - drawio - encryption - files_automatedtagging - files_external - files_mindmap - forms - groupfolders - impersonate - polls - ransomware_protection - support - survey_client - user_ldap - user_usage_report - workflow_pdf_converter ```
Configuration (config/config.php) ``` { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "domain.xy" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/domain.xy", "htaccess.RewriteBase": "\/", "dbtype": "mysql", "version": "20.0.0.4", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "memcache.local": "\\OC\\Memcache\\APCu", "mail_smtpmode": "sendmail", "mail_smtpauthtype": "LOGIN", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "default_language": "de", "default_locale": "de_DE", "logtimezone": "Europe\/Berlin", "theme": "", "loglevel": 2, "updater.release.channel": "beta", "skeletondirectory": "\/var\/www\/default-files", "maintenance": false, "mysql.utf8mb4": true, "data-fingerprint": "01ab1f439dc59f5b900a4be407aad640", "activity_use_cached_mountpoints": "true", "app_install_overwrite": [ "external", "issuetemplate" ] } ```

Are you using external storage, if yes which one: no

Are you using encryption: false

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0

Operating system:

Logs

Web server error log ``` Insert your web server log here ```
Nextcloud log ``` Insert your Nextcloud log here ```
Browser log Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ...
hellfirehd commented 3 years ago

Just upgraded today from 18.0.4 to 20.0.0.9 and the integrity check failed with the following:

Results
=======
- core
    - INVALID_HASH
        - core/js/mimetypelist.js

Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [core/js/mimetypelist.js] => Array
                        (
                            [expected] => 23a3fa45757b26795f5cf8f94d9e5bce76fc916288a6458679311b312c167adcf4158ccb2c5c3db791fa0b87703b6c5863afb6c9d790b8cbac5ab3ae8c3418fb
                            [current] => 248b1c46827f16075a92457d368b5f8c1c6d39c8dc8569e248b35443ac035501b86b8f46785cc6fb3f12fc8445284829c1e27aa82097a53d2688040b1de7da26
                        )
                )
        )
)

Uploading the current mimetypelist.js from 615b994 did not resolve the warning.

rodolpheh commented 3 years ago

In my case, I had the mindmap extension messing with the mimetypelist.js. After removing it with occ app:remove files_mindmap, I was able to pass the integrity check using this file: https://github.com/nextcloud/server/blob/615b994816710a595243d704c9be445f736b4b41/core/js/mimetypelist.js

Akruidenberg commented 3 years ago

samew problem here.

ArmyOfMonkies commented 3 years ago

Uppgraded from 19.0.4 to 20.0.2 and experienced the exact same problem.

mayonezo commented 3 years ago

I got the exact same integrity check fail after manually updating spreed from 10.0.3 to 10.0.4

I already was on NC 20.0.4 without the integrity check failing.

mayonezo commented 3 years ago

copying original mimetypelist.js and running

occ integrity:check-core
occ integrity:check-app $appid spreed

did it for me. Integrity check now passes

doudz commented 3 years ago

Same problem updating from 19.0.6 to 20.0.6, what's the official way to fix this ? I tried : occ maintenance:mimetype:update-js

mimetypelist.js is updated but the problem is still here

occ integrity:check-core
  - INVALID_HASH:
    - core/js/mimetypelist.js:
      - expected: 23a3fa45757b26795f5cf8f94d9e5bce76fc916288a6458679311b312c167adcf4158ccb2c5c3db791fa0b87703b6c5863afb6c9d790b8cbac5ab3ae8c3418fb
      - current: 248b1c46827f16075a92457d368b5f8c1c6d39c8dc8569e248b35443ac035501b86b8f46785cc6fb3f12fc8445284829c1e27aa82097a53d2688040b1de7da26
szaimen commented 3 years ago

As I cannot reproduce the original issue anymore, I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen. The latest version can be seen by checking https://nextcloud.com/install/#install-clients and https://nextcloud.com/install/#instructions-server respectively.

muffinmaster1024 commented 2 years ago

Happened after upgrading from 22.2.3 to 23. Where to get a correctly hashed file? Tried all of my existing backups as well as master and above mentioned branches

kevdogg commented 2 years ago

Just upgraded to 23.0.2 and receive the same error:

root@nextcloud:/usr/local/www/nextcloud # sudo -u www php occ integrity:check-core
  - INVALID_HASH:
    - core/js/mimetypelist.js:
      - expected: 94195a260a005dac543c3f6aa504f1b28e0078297fe94a4f52f012c16c109f0323eecc9f767d6949f860dfe454625fcaf1dc56f87bb8350975d8f006bbbdf14a
      - current: 1b07fb272efa65a10011ed52a6e51260343c5de2a256e1ae49f180173e2b6684ccf90d1af3c19fa97c31d42914866db46e3216883ec0d6a82cec0ad5529e78b1

Can I get the correct file?

BurtGummer commented 2 years ago

Same problem after upgrade (manual with .zip-file) from 21.0.7 to 21.0.9 and from 21.0.9 to 22.2.5, always the same file:

root@server /var/www/html/nextcloud # sudo -u www-data php occ integrity:check-core
  - INVALID_HASH:
    - core/js/mimetypelist.js:
      - expected: 23a3fa45757b26795f5cf8f94d9e5bce76fc916288a6458679311b312c167adcf4158ccb2c5c3db791fa0b87703b6c5863afb6c9d790b8cbac5ab3ae8c3418fb
      - current: 86c1f1b719b65bf02b1dca9b061ef310c8dfface25c9ccfa243c4090665fa6f305d8a4143d7410350af27b1d9e14968c7d999a965d1e110bc674d30ed5dee4e8
root@server /var/www/html/nextcloud #

This files are unzipped from a original .zip file from https://download.nextcloud.com/server/releases/nextcloud-22.2.5.zip ..

Any ideas?

ghost commented 2 years ago

This also happened for me via .tar.bz2 and command line update from 22.2.3 to 21.2.5 and 21.2.5 to 23.0.2

nextcloud@cloud:~/www/nextcloud$ php occ integrity:check-core
  - INVALID_HASH:
    - core/js/mimetypelist.js:
      - expected: 94195a260a005dac543c3f6aa504f1b28e0078297fe94a4f52f012c16c109f0323eecc9f767d6949f860dfe454625fcaf1dc56f87bb8350975d8f006bbbdf14a
      - current: 1b07fb272efa65a10011ed52a6e51260343c5de2a256e1ae49f180173e2b6684ccf90d1af3c19fa97c31d42914866db46e3216883ec0d6a82cec0ad5529e78b1

MD5 and Signature of the tar was checked in advance.

Please reopen

ghost commented 2 years ago

See #30732

danktankk commented 2 years ago

See #30732

that just leads back to this post. any solution for this yet?

[EDIT] I was able to fix by updating to 23.0.2 Beta Channel.

fettfoen commented 2 years ago

I upgraged from version 20 to 23 and have the same issue:

[core/js/mimetypelist.js] => Array ( [expected] => 94195a260a005dac543c3f6aa504f1b28e0078297fe94a4f52f012c16c109f0323eecc9f767d6949f860dfe454625fcaf1dc56f87bb8350975d8f006bbbdf14a [current] => 1b07fb272efa65a10011ed52a6e51260343c5de2a256e1ae49f180173e2b6684ccf90d1af3c19fa97c31d42914866db46e3216883ec0d6a82cec0ad5529e78b1 )

kilrau commented 2 years ago

Same issue, happened with update from 22.2.3 to 22.2.5. Did not manually edit mimetypelist.js.

Please reopen.

trevholland commented 2 years ago

Recently updated to 22.2.6. Getting this error. Why did this get closed when there were, and still are, so many affected people?

kilrau commented 2 years ago

Indeed. Please reopen @szaimen

fettfoen commented 2 years ago

thanks, im also affected, why closed?

szaimen commented 2 years ago

See https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/600

expert-geeks commented 2 years ago

same issue here, onlyoffice is not installed on my server

alexdatur commented 1 year ago

Update do 25.0.3 in docker(apache) - same issue. HOW i CAN FIX IT?

why this issue is closed?wtf

szaimen commented 1 year ago

Hi, this is most likely caused by one of your installed apps and not caused by the sever software.

drizzer commented 1 year ago

remove the file and download the latest version then it works, here are the commands just adjust your installation directory if you have it somewhere else

sudo rm /var/www/nextcloud/core/js/mimetypelist.js
sudo wget https://raw.githubusercontent.com/nextcloud/server/master/core/js/mimetypelist.js -P /var/www/nextcloud/core/js