Skip to content

Conversation

@joshtrichards
Copy link
Member

Summary

Checklist

@joshtrichards joshtrichards added this to the Nextcloud 32 milestone Jun 18, 2025
@joshtrichards joshtrichards added the 3. to review Waiting for reviews label Jun 18, 2025
@joshtrichards joshtrichards requested a review from a team as a code owner June 18, 2025 12:59
@joshtrichards joshtrichards requested review from artonge and removed request for a team June 18, 2025 12:59
@joshtrichards joshtrichards added the ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) label Jun 18, 2025
@solracsf
Copy link
Member

Conflicts :/

@come-nc come-nc force-pushed the jtr-chore-mbstring-func-overload branch from 74d9278 to 6c1a54d Compare August 21, 2025 08:39
@come-nc
Copy link
Contributor

come-nc commented Aug 21, 2025

Rebased and solved conflicts

@skjnldsv
Copy link
Member

Related

There was 1 error:

1) Test\IntegrityCheck\CheckerTest::testWriteCoreSignatureWithValidModifiedHtaccess
Exception: /home/runner/actions-runner/_work/server/server/tests/data/integritycheck/htaccessWithValidModifiedContent/core is not writable

/home/runner/actions-runner/_work/server/server/lib/private/IntegrityCheck/Checker.php:242
/home/runner/actions-runner/_work/server/server/tests/lib/IntegrityCheck/CheckerTest.php:617

--

There was 1 failure:

1) Test\IntegrityCheck\CheckerTest::testVerifyCoreSignatureWithValidModifiedHtaccessSignatureData
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
-Array &0 []
+Array &0 [
+    'INVALID_HASH' => Array &1 [
+        '.htaccess' => Array &2 [
+            'expected' => '7e6a7a4d8ee4f3fbc45dd579407c643471575a9d127d1c75f6d0a49e80766c3c587104b2139ef76d2a4bffce3f45777900605aaa49519c9532909b71e5030[227](https://github.com/nextcloud/server/actions/runs/17121732682/job/48564026759?pr=53578#step:7:228)',
+            'current' => 'b1a6a9fbb85417f3f461e654f1a8ae56a131fe54e4257b2b8b7ba6b3fedd55b83c0df20550cd6c52bd3a96d148a5a3c4ea24d99dca5d45a644491e56ad99df8e',
+        ],
+    ],
+]

@come-nc
Copy link
Contributor

come-nc commented Aug 21, 2025

I do not know what’s the correct way to update those hashes.
I’m surprised only one test fails, there are others that seem to depend on hardcoded hashes for .htaccess.

@nickvergessen You’re the last one to touch those hashes (6 years ago 🙈 ), do you know what’s to do?

This was referenced Aug 22, 2025
@come-nc come-nc force-pushed the jtr-chore-mbstring-func-overload branch from 978fa7f to 4082a45 Compare August 25, 2025 11:19
@come-nc come-nc merged commit 3c14f9f into master Aug 25, 2025
226 of 232 checks passed
@come-nc come-nc deleted the jtr-chore-mbstring-func-overload branch August 25, 2025 15:00
@nickvergessen
Copy link
Member

Just to have it "documented"

You’re the last one to touch those hashes (6 years ago 🙈 ), do you know what’s to do?

Dummy thought is:

// When updating the mimetype list the test assets need to be updated as well
// 1. Update core/js/mimetypelist.js with the new generated js by running the test with the next line uncommented:
// file_put_contents(\OC::$SERVERROOT . '/tests/data/integritycheck/mimetypeListModified/core/js/mimetypelist.js', $newFile);
// 2. Update signature.json using the following occ command:
// occ integrity:sign-core --privateKey=./tests/data/integritycheck/core.key --certificate=./tests/data/integritycheck/core.crt --path=./tests/data/integritycheck/mimetypeListModified

But what I did was:
INSIDE of:

$this->callback(function ($signature) use ($expectedSignatureFileData) {
$expectedArray = json_decode($expectedSignatureFileData, true);
$actualArray = json_decode($signature, true);

Print actual values. Update the hash (L588) and signature (L591) in this test and use the same values in testVerifyCoreSignatureWithValidModifiedHtaccessSignatureData

@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: settings ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants