How to update signature.json to pass integrity check

Hi,
Using Nextcloud 20.0.1 docker image.
Failing integrity check because I modified .htacces, everything else is working great.

1.) I updated two rules in .htaccess.
2.) Ran occ maintenance:update:htaccess and occ integrity:check-core which showed incorrect hash.
3.) I then used sed to replace the old htaccess hash with the new one in signature.json
That produced this error

Results
=======
- core
	- EXCEPTION
		- OC\IntegrityCheck\Exceptions\InvalidSignatureException
		- Signature could not get verified.

Question is:
How do you modify core configuration files and properly update the signature.json file.

1 Like

Do you fix this problem ?

Just ran into the problem of .htaccess having an invalid hash just after updating. How do one update the hash the correct way?

I did try this too and ended up the same way.

I cannot find any useful documentation on how to do this correctly.
Would need a way to manually edit core files and update the signatures.
…or a way to update the hash of .htaccess (Which I never touched or edited. Its hash is invalid out of the distribution package)

EDIT:
I looked into adding .htaccess to a config array:
‘integrity.excluded.files’ => [ ‘.htaccess’ ],
…but that seems to make no change.

I think that is not possible. If you only find the one problem file you can temporary disable the check. Enable it after update for next releases.

'integrity.check.disabled' => true,