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

Some files have not passed the integrity check. #9731

Closed
sgofferj opened this issue Jun 11, 2024 · 4 comments · May be fixed by nextcloud/cms_pico#248
Closed

Some files have not passed the integrity check. #9731

sgofferj opened this issue Jun 11, 2024 · 4 comments · May be fixed by nextcloud/cms_pico#248

Comments

@sgofferj
Copy link

Steps to reproduce

  1. Check admin settings

Expected behavior

Integrity check should pass clean

Actual behavior

Integrity check reports extra files. Manually deleting helps but they are back at least after an update of Mail,

Mail app version

3.7.1

Mailserver or service

postfix/cyrus

Operating system

Linux/docker

PHP engine version

PHP 8.2

Web server

Nginx

Database

MySQL

Additional info

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
=======
- mail
	- EXTRA_FILE
		- vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/HTML/4.15.0,100a0d442686872045400b774dcb082c945a1908,2019080701.ser

Raw output
==========
Array
(
    [mail] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/HTML/4.15.0,100a0d442686872045400b774dcb082c945a1908,2019080701.ser] => Array
                        (
                            [expected] => 
                            [current] => c68d95b7adc0174b7dcdc500b4480d4e29378ecda31c124be014323035795d47678e4d77629e7cfc8a667f6ec49863274ee48654b0a93d18e3a20c9f0febcdbf
                        )

                )

        )

)
@joshtrichards
Copy link
Member

Do you happen to have cms_pico installed? It's also possible it's another app that uses the same dependency. Just dealt with this on the forum:

https://help.nextcloud.com/t/some-files-have-not-passed-the-integrity-check-upgrade-to-28-0-4-mail-app/186622/3

The mail app itself doesn't use caching within HTMLPurifier so this isn't technically coming from mail, but it ends up showing as if it is mail's problem.

@sgofferj
Copy link
Author

I do have pico_cms enabled, yes.

@joshtrichards
Copy link
Member

joshtrichards commented Jun 13, 2024

Then this can only be fixed by cms_pico. They're using the cache in HTMLPurifier without setting the path for it so it's defaulting to "wherever the library is installed":

http://htmlpurifier.org/live/configdoc/plain.html

Cache.SerializerPath

@ChristophWurst ChristophWurst closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
joshtrichards added a commit to nextcloud/cms_pico that referenced this issue Jun 14, 2024
HTMLSerializer uses the path the library is installed it as the cache by default. Since other Nc apps use HTMLSerialize, the app who's copy of HTMLSerialize happens to get used first, ends up with a bunch of stray cache files. Besides being messy, this brings things like integrity checks.

See nextcloud/mail#9731

There are three choices here:

- disable the cache (this what the Nc `mail` app does)
- leave it enabled by specifying a path
- accept it as is

Performance impact of disabling is unknown. If we eventually want this enabled still in Pico, we can set `Cache.SerializePath` to somewhere we're comfortable saving data (locally on the instance...). 

Ref: http://htmlpurifier.org/live/configdoc/plain.html#Cache.DefinitionImpl

Signed-off-by: Josh <[email protected]>
@joshtrichards
Copy link
Member

joshtrichards commented Jun 14, 2024

nextcloud/cms_pico#248 should address this.
You can test the proposed fix by manually patching your cms_pico (it's a single line change) or following the patch install instructions in the Admin Manual: https://docs.nextcloud.com/server/latest/admin_manual/issues/applying_patch.html

You'll also need to delete the extra files shown in a recent integrity report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants