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

[release/11.5] Release 11.5 #79

Merged
merged 247 commits into from
Feb 10, 2021
Merged

[release/11.5] Release 11.5 #79

merged 247 commits into from
Feb 10, 2021

Conversation

felix-schwarz
Copy link
Collaborator

Description

PR with all SDK changes for 11.5.

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)

	- recognizing normalized paths
	- recognizing unnormalized / malformed paths
- OCCore
	- absence of parent items is now used as indication that a sub item of the absent parent item does not exist
	- [OCCore trackItemAtPath:trackingHandler:] now returns OCErrorUnnormalizedPath when passing unnormalized paths (containing f.ex. "//", "." or "..")
- new tests covering the new & improved functionality
- adds additional parameters to token request to ensure the retrieval of a refresh_token in case the OIDC provider isn't configured to this by default
- improve URL construction for absolute URLs (avoid leading double-slash)
- add new -[OCAuthenticationMethodOAuth2 retrieveEndpointInformationForConnection:] method to dynamically retrieve endpoints if needed (like for OIDC)
- add additional details to OCHTTPPipeline logging
- remove unused source code (OCWaitConditionPendingRequest)
- disabling background NSURLSession usage for apps running under iOS 13.1+ and having a FileProvider
- add auto-resume flag when downloading files

OCHTTPPipeline:
- add support for auto-resume of downloads
- updated `CONFIGURATION.md` to document the change
- OCAppIdentity: added appVersion and appBuildNumber properties
- UIDevice+ModelID: category allowing to retrieve the device's model identifier
- OCHTTPPipeline:
	- OCHTTPPipeline.userAgent builds, caches and returns the User-Agent
	- injects User-Agent into requests before sending them out
	- new OCClassSettingsIdentifierHTTP and OCHTTPPipelineSettingUserAgent
- OCDatabase: removed leftover debug message
- add ability to register classes for keys globally (use this sparingly)
- avoid unneeded deserializations when notifying observers of new values: if there's no observer for a key, there's no need to deserialize it

OCProcessManager:
- make property-like method sharedProcessManager an actual property
…lability across supported platforms

	- Adapt code to compile File Provider support code only on iOS and Mac Catalyst
…at's used in startAuthenticationSession

	- added new OCAuthenticationBrowserSession class to allow plugging in alternative OAuth2 session providers
		- added OCAuthenticationBrowserSessionUIWebView as an implementation based on UIWebView, available right in the SDK as an option to work around issues in certain MDM software
	- added new OCClassSettings parameter "oa2-browser-session-class" to specify a class to use as alternative OAuth2 session providers
		- use "oc:authentication-oauth2.oa2-browser-session-class=string:UIWebView" as environment variable to use the OCAuthenticationBrowserSessionUIWebView class for OAuth2
	- added OC_FEATURE_AVAILABLE_AUTHENTICATION_SESSION availability macro

- add tvOS target and devices to ownCloudSDK target
	- fix dependencies and availability issues
…n-compatible APIs may be used (which silences a warning about this not being the case in a version of ownCloudApp with OCLicense*)
- SyncEngine: add preflight completion handler support
- LocalImport: make sure the placeholder completion handler is only called *after* the placeholder item is also in the database (fixes owncloud/enterprise#3642)
- CreateFolder: make sure the placeholder completion handler is only called *after* the placeholder item is also in the database (for future-proofing / consistency)
- OCItem: add -syncActivityDescription to provide a description of the OCItem sync activity contents
- adding .latestVersionOfLocalItem convenience attribute that retrieves (and caches) the latest version of an item

OCSyncActionUpload:
- use .latestVersionOfLocalItem instead of .localItem to fix an issue where a file was added offline, then updated offline, so that the activeSyncRecords of the OCItem got inconsistent:
	- upload file -> item has activeSyncRecord A
	- update file -> item has activeSyncRecords A, B
	- A: actually upload file -> item has no activeSyncRecords
	- B: actually update file -> item has activeSyncRecords A, spinning forever
- fix related issue that preflight could add a placeholder item to the database more than once, by only adding the placeholder as a new item if it has no databaseID yet
- OCConnection
	- new method to retrieve the path for a private link
- OCError
	- two new error codes indicating private link formatting or resolution errors
- OCCore
	- new method to retrieve the OCItem for a private link
	- make trackItem method more robust when targeting directories with non-OCPath-conforming paths (missing a trailing "/")
- OCItem+OCXMLObjectCreation
	- add support for extracting resolved private link paths
- Unit Tests
	- 4 new unit tests for the new OCConnection and OCCore methods
- expose background change scan activity via OCActivityIdentifierPendingServerScanJobsSummary activity identifier
- new OCBookmarkUserInfoKey type for OCBookmark.userInfo keys
- new OCBookmarkUserInfoKeyStatusInfo key holding the status.php contents of the last valid & non-maintenance connection to a server
- replace left-over usage of NSUUID* with OCBookmarkUUID in OCBookmarkManager

OCConnection:
- update OCBookmark.userInfo[OCBookmarkUserInfoKeyStatusInfo] on every successful connect
- add "email" to scope
- make scope configurable via ClassSettings
- document `oidc-scope` in CONFIGURATION.md
	- NSError category to simplify detecting NSErrors representing a network error/network failure
- OCConnection:
	- new OCConnection.authSignals that authentication methods can use to schedule their requests - allows the core to define conditions for these
- OCAuthenticationMethodOAuth2:
	- change token refresh to wait for network availability before sending token requests
	- taking advantage of new OCConnection.authSignals
	- fixing an unnecessary scheduling loop when no network connection is available and the token needs to be refreshed
- OCCore:
	- add new ready state (OCCoreStateReady) that is reached after setting up the infrastructure but before contacting the server
	- work around compiler bug in -[OCCore stopQuery:] that could crash the app
- OCCore+ConnectionStatus:
	- add new network available signal (OCConnectionSignalIDNetworkAvailable)
	- (re)starts background update checks and item task list scheduling when the connection is coming online
- OCCoreServerStatusSignalProvider:
	- allow providing the exact error when reporting that the connection was refused
	- uses the localizedDescription of the error as .shortDescription, if available
- OCCore+ItemList:
	- faster duplicate scheduled task detection
	- ensure OCQuerys are updated promptly even if there's already an item list task for the same path, resulting in queueing
	- fix bug that could permanently halt the item list task scheduling queue when offline
	- re-attempt update of item list tasks that failed and were put back in "new" state
	- ensure thread-safe use of _itemListTasksByPath
	- fix bug that led to deletion of scheduled background scans when offline
	- ensure scheduled background scans only take place when network is available (utilizing new OCConnectionSignalIDNetworkAvailable)
	- detect and avoid duplicate scheduling of jobs
- OCCoreItemListTask:
	- add new updateIfNew method to update only those sets whose state is "new"
	- add support for injecting required signal options depending on whether a PROPFIND is scheduled for a query or background scan
…to file download requests (enterprise#4338)

- NSError+OCError: add a new OCErrorWithDescriptionFromError macro that allows creating an OCError based on another error with custom description
- OCCertificate+OpenSSL:
	- add nullability annotations
	- extend API to compare certificates
- OCCertificateDetailsViewNode:
	- add nullability annotations
	- add support for different types of changes, supporting old and new values, old and new certificates (for certificate chains)
- OCCertificateViewController
	- add support for certificate comparisons, with a "+/- Show/Hide" toolbar button baked right in
	- highlight changes with colors and circled +/- signs
…ransfers

- resumable downloads occur when backgrounding the app
- resumable downloads would be rescheduled automatically to complete the download
- by rescheduling, the request got a new X-Request-ID, but that one was never used by iOS
- when iOS returned the response for the resumed download, it came back with the OLD X-Request-ID, resulting in the Pipeline not being able to recognize the request
- result was hung downloads at the pipeline level
- fixed: now avoids recreating the X-Request-ID for resumed requests
…rtificate with an empty data blob, prompting a certificate warning dialog on next connect
…t used at the time the token was registered in the Authorization header, while using the latest registered client_id / client_secret as parameters
* - OCConnection+Setup:
	- remove support for auto-detection of OC installations in "owncloud" subfolder
	- no longer alert user of root redirects if they happen on the same host with the same scheme (http/https)
- OCClassSettings:
	- add new DictionaryArray and URLString types
	- add validation support for new types

* OCClassSettings+Metadata:
- also include registered metadata when determining available keys for a settings identifier
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

…l duplicate control and permanent removal of support for subfolder installs in `/owncloud/`.
- Connection Validator: infinite loops detection:
	- increments a counter for the URL whose response triggered a connection validation
	- decrements the counter when receiving a response from the same URL that no longer would trigger a connection validation (bringing it back to 0, ideally)
	- if the response to the URL triggered validation more than 3 times, the response is delivered instead of triggering validation
- Connection Setup:
	- count how often an URL was the target of a redirect during setup
	- if a URL was already targeted more than 0 times (adjustable), declare detection of the server root URL as failed
- HTTP Pipeline:
	- turn certificate missing log message from error into warning, since it is not handled as an error internally, either and can be confusing when debugging
…errors to indicate from where a redirection started

- OCAuthenticationMethodOpenIDConnect:
	- add redirection detection for .well-known/openid-configuration
	- improved error handling
- OCBookmark+Diagnostics: add "Use Origin URL as URL" action to reset multi-tenancy redirection info in bookmarks
- OCConnection:
	- fix recovery from answered redirection warning issues
	- add support for redirections to other hosts (previously a hard error)
- OCCore:
	- pick up certificate rejection errors from OCHTTPPolicyBookmark and present them to the user
	- remove unused attemptConnect method variant
- OCHTTPPolicyBookmark: improved description of errors where a certificate was changed but could not be auto-accepted
- OCCertificateDetailsViewNode: fix a crasher caused by unconverted object types stored in .previousValue
- OCConnection: add fallback option to extractBaseURLFromRedirectionTargetURL:… to return redirectionTargetURL in case no common base path could be found
- OCAuthenticationMethod: replace local fallback with above fallback
…ze resource usage

- OCAuthenticationMethodOAuth2: use OCLock to secure token refreshs and avoid issue (3) reported in ios-app#886
- OCHTTPPipeline: new HTSum-tagged brief one-line summary of HTTP requests and responses (to be extended)
- OCConnection+Setup: add base URL extraction call to redirection handling for status requests
- OCConnection: Connection Validator now also checks for the same port before it starts
- NSURL+OCURLNormalization: standardized URL port and scheme/host/port comparison additions, nullability annotations
…host and scheme to NSURL+OCURLNormalization utility method.
…owing shortening of the identifiers earlier)
@hosy hosy self-requested a review February 10, 2021 17:55
@hosy hosy merged commit e774c75 into master Feb 10, 2021
@delete-merged-branch delete-merged-branch bot deleted the release/11.5 branch February 10, 2021 20:26
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.

4 participants