Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.0.3] occ maintenance:mimetype:update-js ==> failed the integrity check #28967

Closed
michaelstingl opened this issue Sep 10, 2017 · 14 comments · Fixed by #28973
Closed

[10.0.3] occ maintenance:mimetype:update-js ==> failed the integrity check #28967

michaelstingl opened this issue Sep 10, 2017 · 14 comments · Fixed by #28973
Assignees
Labels
feature:code-signing-integrity feature:theming p1-urgent Critical issue, need to consider hotfix with just that issue status/STALE Type:Bug
Milestone

Comments

@michaelstingl
Copy link

michaelstingl commented Sep 10, 2017

Running sudo -u www-data php occ maintenance:mimetype:update-js (after workaround from #28966 (comment)) breaks integrity:

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

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

Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [core/js/mimetypelist.js] => Array
                        (
                            [expected] => 8edea6fdddf5c20e8fd0de847a25b7af57d0b454877138a917587e1eafcc31754aece7549cd92536f78cd9d29583458757802315ae60e656a332de9e4e0879d0
                            [current] => 2f2826ee7ffdc9be2090c71976697367448223d5e72d11e930d3343950b861aada290b8a4a6519ef4446833392745bf9d699fcaf99d0c553f06c068b18e60df6
                        )

                )

        )

)

Steps to reproduce

  1. Install oC 10.0.3 RC1
  2. Activate Example ownCloud Theme
  3. mkdir apps/theme-example/core/img/filetypes/
  4. cp core/img/filetypes/folder*.* apps/theme-example/core/img/filetypes/
  5. sudo -u www-data php occ maintenance:mimetype:update-js -vvv

Expected behaviour

modified mimetypelist.js shouldn't break integrity

Actual behaviour

The following list covers which files have failed the integrity check:
core/js/mimetypelist.js

Server configuration

Operating system:
Ubuntu 16.04.3 LTS

Web server:
Apache/2.4.18 (Ubuntu)

Database:
10.0.31-MariaDB-0ubuntu0.16.04.

PHP version:
PHP 7.0.22-0ubuntu0.16.04.1

ownCloud version: (see ownCloud admin page)
{"installed":"true","maintenance":"false","needsDbUpgrade":"false","version":"10.0.3.2","versionstring":"10.0.3 RC1","edition":"Enterprise","productname":"ownCloud"}

Updated from an older ownCloud or fresh install:
Updated from oC 9.1.x

Where did you install ownCloud from:
*.tar

Signing status (ownCloud 9.0 and above):

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

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

The content of config/config.php:

{
    "system": {
        "updatechecker": false,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "\/var\/www\/owncloud\/data",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "10.0.3.2",
        "dbname": "cloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "license-key": "***REMOVED SENSITIVE VALUE***",
        "supportedDatabases": [
            "mysql",
            "pgsql",
            "oci"
        ],
        "mail_smtpmode": "smtp",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "smtp.gmail.com",
        "mail_smtpport": "465",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "gmail.com",
        "mail_smtpsecure": "ssl",
        "loglevel": 2,
        "maintenance": false
    }
}

List of activated apps:

Enabled:
  - activity: 2.3.4
  - admin_audit: 0.8
  - announcementcenter: 1.2.0
  - comments: 0.3.0
  - configreport: 0.1.1
  - customgroups: 0.3.1
  - dav: 0.3.0
  - diagnostics: 0.1.2-beta1
  - enterprise_key: 0.1.3
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_pdfviewer: 0.8.2
  - files_sharing: 0.10.1
  - files_texteditor: 2.2
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firewall: 2.4.1
  - firstrunwizard: 1.1
  - gallery: 16.0.2
  - guests: 0.4.1
  - market: 0.2.1
  - notifications: 0.3.1
  - oauth2: 0.1.1
  - password_policy: 1.0.2
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - systemtags_management: 0.2.0
  - templateeditor: 0.1
  - theme-example: 1.0.0
  - workflow: 0.2.4
Disabled:
  - encryption
  - external
  - files_antivirus
  - theme-mailtest
  - updatenotification
  - user_external

Are you using external storage, if yes which one: local/smb/sftp/...
no

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

LDAP configuration (delete this part if not used)

Client configuration

Browser:
Chrome 60

Operating system:
macOS Sierra 10.12.6

@phisch This is important to fix. Could you check?

@PVince81
Copy link
Contributor

@Rello can you run this and make a PR with the result ? I believe this was caused by your mimetype changes and I forgot to check the part about rerunning this command.

@PVince81
Copy link
Contributor

never mind I'll do this myself, it seems there might be other complications

@PVince81
Copy link
Contributor

hmmm weird, it doesn't add the new mime types there:

diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js
index c87fce813d..e2002228ea 100644
--- a/core/js/mimetypelist.js
+++ b/core/js/mimetypelist.js
@@ -108,7 +108,5 @@ OC.MimeTypeList={
     "x-office-presentation",
     "x-office-spreadsheet"
 ],
-       themes: {
-    "example": []
-}
+       themes: []
 };

@PVince81
Copy link
Contributor

Ok so it seems this command is only for mimetype aliasses. No aliases were added for m3u. That's fine.

I'll run the script only to make sure the generated version matches to avoid the integrity error.

@PVince81
Copy link
Contributor

PR here: #28969

@PVince81
Copy link
Contributor

this PR doesn't fix the expectaction that the "themes" folder exists, for that one, see #28966

@PVince81 PVince81 assigned PVince81 and unassigned phisch Sep 11, 2017
@PVince81
Copy link
Contributor

The fix only ensures that this file is the same when regenerated, without modifications.

If you add your own new aliases or theme related stuff, the integrity check might fail again on this file due to the modifications... We might need to exclude this file from the integrity check then.

@michaelstingl
Copy link
Author

michaelstingl commented Sep 11, 2017

We might need to exclude this file from the integrity check then

👍

@PVince81
Copy link
Contributor

  • exclude mimetype file from integrity check of find a better way

@PVince81
Copy link
Contributor

@michaelstingl do you have a more exhaustive list of files that would be modified by that command ?

@PVince81
Copy link
Contributor

PR here: #28973

I hope this is the only file.

@PVince81
Copy link
Contributor

In general we need to find another way to deliver the same information, maybe have this file's information stored in the "config/" folder and then have a route to retrieve it: #28974

@michaelstingl
Copy link
Author

@michaelstingl do you have a more exhaustive list of files that would be modified by that command ?

@phisch is the expert.

@lock
Copy link

lock bot commented Aug 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature:code-signing-integrity feature:theming p1-urgent Critical issue, need to consider hotfix with just that issue status/STALE Type:Bug
Projects
None yet
4 participants