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

fix(federation): Change the Talk-Hash header when overwriting capabil… #11900

Merged

Conversation

nickvergessen
Copy link
Member

…ities

☑️ Resolves

🛠️ API Checklist

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

…ities

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen added 3. to review bug feature: api 🛠️ OCS API for conversations, chats and participants feature: federation 🌐 labels Mar 22, 2024
@nickvergessen nickvergessen added this to the 💞 Next Beta (29) milestone Mar 22, 2024
@nickvergessen nickvergessen self-assigned this Mar 22, 2024
@SystemKeeper
Copy link
Contributor

SystemKeeper commented Mar 22, 2024

Why not doing the hash calculation at

if ($response->getHeaders()['X-Nextcloud-Talk-Hash']) {
$headers['X-Nextcloud-Talk-Proxy-Hash'] = $response->getHeaders()['X-Nextcloud-Talk-Hash'];
}

?

Also, wouldn't it be more clear if we create an array with our changes (much like in overwrittenRemoteTalkHash) and then use the array for the hash update and use array_merge for the resulting capabilities ?

@nickvergessen
Copy link
Member Author

Because we also deal with the hash in 2 other places and it sounds to risky to rehash in x places

@nickvergessen nickvergessen merged commit 20defcf into main Mar 25, 2024
64 checks passed
@nickvergessen nickvergessen deleted the bugfix/11865/change-hash-when-overwriting-capabilities branch March 25, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug feature: api 🛠️ OCS API for conversations, chats and participants feature: federation 🌐
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overwriting capability setting does not invalide proxy hash
2 participants