Skip to content

MIM-2666 Align mod_caps hashing with XEP-0300 and XEP-0414#4679

Merged
chrzaszcz merged 4 commits intofeature/capsfrom
caps-hash
Mar 20, 2026
Merged

MIM-2666 Align mod_caps hashing with XEP-0300 and XEP-0414#4679
chrzaszcz merged 4 commits intofeature/capsfrom
caps-hash

Conversation

@chrzaszcz
Copy link
Copy Markdown
Member

@chrzaszcz chrzaszcz commented Mar 20, 2026

Changes:

  • Correct the wrong hashes namespace.
  • Drop MD5, which is a MUST NOT in XEP-0414.
  • Drop shake* functions, which are not mentioned in XEP-0300 or XEP-0414 at all, and were just included because they appeared in IANA hash function text names. I don't see a reason why anyone would use them for entity capabilities. They were also XOF functions, and their lengths was chosen a bit arbitrarily.
  • Advertise the hash + functions namespaces as required by XEP-0300.

Notes:

@chrzaszcz chrzaszcz changed the title Caps hash Align mod_caps hashing with XEP-0300 and XEP-0414 Mar 20, 2026
- Fix the hash namespace, and update its name to make it more obvious
  it is version 2
- Drop support for shake* algorithms not mentioned in XEP-0414
- Drop support for MD5 algorithm, which is a 'MUST NOT' in XEP-0414
- Advertise hash features as required by XEP-0300 section 5 Ex. 2
@mongoose-im
Copy link
Copy Markdown
Collaborator

mongoose-im commented Mar 20, 2026

CircleCI results for 615d08d


elasticsearch_and_cassandra_latest / elasticsearch_and_cassandra_mnesia / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 672 / Failed: 0 / User-skipped: 83 / Auto-skipped: 0


small_tests_legacy / small_tests / 7a1478a
Reports root / small


small_tests_latest / small_tests / 7a1478a
Reports root / small


small_tests_latest_arm64 / small_tests / 7a1478a
Reports root / small


ldap_mnesia_legacy / ldap_mnesia / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 2261 / Failed: 0 / User-skipped: 1472 / Auto-skipped: 0


ldap_mnesia_latest / ldap_mnesia / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 2261 / Failed: 0 / User-skipped: 1472 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_legacy / pgsql_mnesia / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 5181 / Failed: 0 / User-skipped: 209 / Auto-skipped: 0


internal_mnesia_latest / internal_mnesia / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 2410 / Failed: 0 / User-skipped: 1323 / Auto-skipped: 0


dynamic_domains_mysql_redis_latest / mysql_redis / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 5145 / Failed: 0 / User-skipped: 245 / Auto-skipped: 0


pgsql_cets_latest / pgsql_cets / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 5315 / Failed: 0 / User-skipped: 203 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_latest / pgsql_mnesia / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 5181 / Failed: 0 / User-skipped: 209 / Auto-skipped: 0


pgsql_mnesia_legacy / pgsql_mnesia / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 5498 / Failed: 0 / User-skipped: 263 / Auto-skipped: 0


cockroachdb_cets_latest / cockroachdb_cets / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 5315 / Failed: 0 / User-skipped: 203 / Auto-skipped: 0


mysql_redis_latest / mysql_redis / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 5491 / Failed: 0 / User-skipped: 270 / Auto-skipped: 0


pgsql_mnesia_latest / pgsql_mnesia / 7a1478a
Status: 🟢 Passed
Reports root/ big
OK: 5498 / Failed: 0 / User-skipped: 263 / Auto-skipped: 0

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.76%. Comparing base (6989a22) to head (7a1478a).
⚠️ Report is 6 commits behind head on feature/caps.

Additional details and impacted files
@@               Coverage Diff                @@
##           feature/caps    #4679      +/-   ##
================================================
- Coverage         85.76%   85.76%   -0.01%     
================================================
  Files               551      551              
  Lines             33168    33166       -2     
================================================
- Hits              28448    28446       -2     
  Misses             4720     4720              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chrzaszcz chrzaszcz marked this pull request as ready for review March 20, 2026 15:35
@chrzaszcz chrzaszcz merged commit 70ae6f9 into feature/caps Mar 20, 2026
4 checks passed
@chrzaszcz chrzaszcz deleted the caps-hash branch March 20, 2026 15:35
@chrzaszcz chrzaszcz mentioned this pull request Mar 23, 2026
@chrzaszcz chrzaszcz changed the title Align mod_caps hashing with XEP-0300 and XEP-0414 MIM-2666 Align mod_caps hashing with XEP-0300 and XEP-0414 Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants