Skip to content

make sure to use json for federation post and get #40815

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

Merged
merged 3 commits into from
May 26, 2023
Merged

make sure to use json for federation post and get #40815

merged 3 commits into from
May 26, 2023

Conversation

mrow4a
Copy link
Contributor

@mrow4a mrow4a commented May 26, 2023

Description

After update of guzzle , it was no longer possible to request format of response to be json when adding in query parameter. Because default OCSController method assigns xml https://github.com/owncloud/core/blob/v10.12.0/lib/public/AppFramework/OCSController.php#L143-L146 , it was returning XML, but apps/federation/lib/Controller/OCSAuthAPIController.php expects JSON.

Now exchange is correctly performed, and servers are marked "green"

WARNING: the patch/fix needs to be applied on all federated severs that are not yet "paired" and have the issue with guzzle library. Otherwise pairing will not work.

Remarks:

  • the initial pairing still leaves systems in "yellow" boxes state, but what is important is that both servers correctly exchanged "shared secret and have entries properly updated. To speed up the process, after adding trusted servers in UI force background jobs for "GetSharedSecret" and/or "RequestSharedSecret"
occ background:queue:execute --force --accept-warning 19
occ background:queue:execute --force --accept-warning 20 
  • to make the instances green, run below commands
occ dav:sync-system-addressbook
occ federation:sync-addressbook

Related Issue

Types of changes

  • Bugfix

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket (not needed)
  • Changelog item, see TEMPLATE

@mrow4a mrow4a self-assigned this May 26, 2023
@update-docs
Copy link

update-docs bot commented May 26, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@mrow4a mrow4a requested a review from jvillafanez May 26, 2023 09:08
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
66.7% 66.7% Duplication

@jvillafanez
Copy link
Member

WARNING: the patch/fix needs to be applied on all federated severs that are not yet "paired" and have the issue with guzzle library. Otherwise pairing will not work.

If this depends on the guzzle version, the affected OC versions should be 10.11.x and 10.12.x . It should be irrelevant for earlier versions.
I mean, if your 10.12.x versions wants to pair with a 10.8.x version, the patch should be applied only in the 10.12.x version.

@mrow4a mrow4a merged commit c813689 into master May 26, 2023
@delete-merged-branch delete-merged-branch bot deleted the e5676-bugfix branch May 26, 2023 11:59
shokri-navid pushed a commit to pondersource/core that referenced this pull request Jul 16, 2023
* make sure to use json for federation post and get

* add changelog

* minor fixes
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.

2 participants