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/core-overlap] Fix OCCore overlap for first connection #1081

Merged
merged 7 commits into from Dec 22, 2021

Conversation

felix-schwarz
Copy link
Contributor

Description

Prevent requesting and immediately returning a core for the newly generated bookmark if it is the first one and
the conditions in didUpdateServerList() would lead to a replacement of this view controller. Because then, this would
happen:

  • didUpdateServerList() replaces ServerListTableViewController with StaticLoginSingleAccountServerListViewController
  • showBookmarkUI(attemptLoginOnSuccess:true) starts a new connection on the replaced ServerListTableViewController, which requests a core from OCCoreManager
  • then immediately ClientRootViewController gets deallocated, which returns the core to OCCoreManager
  • the unusual immediate request + return might lead to an overlap with the next request for a core, so duplicate OCCore and OCConnection instances exist for a moment, possibly interfering event and request routing of one another

Related Issue

https://github.com/owncloud/enterprise/issues/4925

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

…n-client-registration-failure, defaulting to true, to allow the automatic fallback to default client_id / client_secret if OpenID Connect Dynamic Client Registration fails with any error
…rather than .displayName

- OCBookmark+AppExtensions:
	- make .displayName readonly and mark it as legacy
	- return .userDisplayName for .displayName if the former has a value
- StaticLoginSingleAccountServerListViewController:
	- remove OCConnection code to fetch a user's display name and use bookmark.displayName instead
	- listen for bookmark updates and trigger a header update then accordingly
- update SDK to gain bookmark.userDisplayName support
…venting an immediate OCCore request and unclean return with possible instance overlap by starting the connection on the - at that time - already removed parent view controller.
@CLAassistant
Copy link

CLAassistant commented Dec 21, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ hosy
❌ felix-schwarz
You have signed the CLA already but the status is still pending? Let us recheck it.

@hosy hosy merged commit 18d7aad into milestone/11.8.1 Dec 22, 2021
@delete-merged-branch delete-merged-branch bot deleted the fix/core-overlap branch December 22, 2021 08:30
hosy added a commit that referenced this pull request Dec 22, 2021
* preparing bug fix release 11.8.1

* - added in-app release notes
- added fastlane changelog
- added Calens changelog entry

* Calens changelog updated

* [feature/oidc-dcr-fallback] Fallback on/ignore OIDC Dynamic Client Registration errors (#1068)

* - update SDK to add support for authentication-oauth2.oidc-fallback-on-client-registration-failure, defaulting to true, to allow the automatic fallback to default client_id / client_secret if OpenID Connect Dynamic Client Registration fails with any error

* - fix infinite OAuth2 token refresh loop via SDK update

* removed ipa name to get a timestamp ipa output name

* changed ipa name by value

* output git branch, set git branch in IPA file name

* remove newline from gitbranch name

* set git branch in branding.plist

* renamed git hash key

* - new version number for upload
- changed changelog folder name

* Calens changelog updated

* [fix/connection-stuck] Fix eternal "Connecting…"  (#1080)

* - update SDK to add support for authentication-oauth2.oidc-fallback-on-client-registration-failure, defaulting to true, to allow the automatic fallback to default client_id / client_secret if OpenID Connect Dynamic Client Registration fails with any error

* - fix infinite OAuth2 token refresh loop via SDK update

* - BookmarkViewController: store user.displayName in .userDisplayName rather than .displayName
- OCBookmark+AppExtensions:
	- make .displayName readonly and mark it as legacy
	- return .userDisplayName for .displayName if the former has a value
- StaticLoginSingleAccountServerListViewController:
	- remove OCConnection code to fetch a user's display name and use bookmark.displayName instead
	- listen for bookmark updates and trigger a header update then accordingly
- update SDK to gain bookmark.userDisplayName support

* - update SDK to gain bookmark.userDisplayName support

Co-authored-by: Matthias Hühne <mhuehne@owncloud.com>

* new build number

* use latest develop sdk commit

* [fix/core-overlap] Fix OCCore overlap for first connection (#1081)

* - update SDK to add support for authentication-oauth2.oidc-fallback-on-client-registration-failure, defaulting to true, to allow the automatic fallback to default client_id / client_secret if OpenID Connect Dynamic Client Registration fails with any error

* - fix infinite OAuth2 token refresh loop via SDK update

* - BookmarkViewController: store user.displayName in .userDisplayName rather than .displayName
- OCBookmark+AppExtensions:
	- make .displayName readonly and mark it as legacy
	- return .userDisplayName for .displayName if the former has a value
- StaticLoginSingleAccountServerListViewController:
	- remove OCConnection code to fetch a user's display name and use bookmark.displayName instead
	- listen for bookmark updates and trigger a header update then accordingly
- update SDK to gain bookmark.userDisplayName support

* - update SDK to gain bookmark.userDisplayName support

* Prevent unwanted connection following setup of the first account, preventing an immediate OCCore request and unclean return with possible instance overlap by starting the connection on the - at that time - already removed parent view controller.

* new build number

Co-authored-by: Matthias Hühne <mhuehne@owncloud.com>

* - updated build number
- updated release notes
- changed changelog folder name

* Calens changelog updated

* - update SDK (#1064)

- make SortMethod.comparator use OCSQLiteCollationLocalized.sortComparator

* Configuration documentation updated

* added improved sorting to changelog

* new changelog entry

* Calens changelog updated

Co-authored-by: hosy <hosy@users.noreply.github.com>
Co-authored-by: Felix Schwarz <fs-git@iospirit.com>
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.

None yet

3 participants