You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Bug #3115: Add further driveId validation when processing API response data for a OneDrive Personal Shared Folder (#3116)
* Remove 'sea8cc6beffdb43d7976fbc7da445c639' check
* Add further personal account driveId length checks when generating a /delta response for a Shared Folder
* Fix selectRemoteTypeByRemoteDriveId() function to also use the remote item id so that the correct DB record is responded with. This ensures that 'localPathExtension =' reflects the correct local path extension and not some other incorrect local path
* If the 'shared' JSON structure is missing, add a debug message
* Add further checks for invalid 15 character driveId when creating Shared Folder references
* Ensure that the 'driveId' value is correctly fetched and used due to 'UPPERCASE' and 'lowercase' values in API JSON response
* Increase DB version to ensure all old records in the DB are purged
* Sanitise JSON output for debug logging when enabled
* Simplify isValidUTF8Timestamp()
* Debug logging is not correct - missing all single --verbose entries which should be also included when performing a debug capture.
* Based on application debug logs, if /delta fails to send Shared Folders, and the client goes to create these online, we know that these then exist online and are a Shared Folder. Handle in a similar manner to OneDrive Business Shared Folders logic to create the required database tie records if the API fails to send that data originally.
* Remove double call to selectiveSync.isFileNameExcluded
* Align invalid UTF-8 message to be consistent with other UTF-8 failure messages
This PR specifically works around the Microsoft OneDrive change:
* Microsoft moving all OneDrive Personal Accounts to a new backend platform. This is the 'sea8cc6beffdb43d7976fbc7da445c639' change: OneDrive/onedrive-api-docs#1890
* Microsoft failing to provide the Graph API data in the /delta call for accounts moved to the new backend platform: OneDrive/onedrive-api-docs#1891
Copy file name to clipboardexpand all lines: src/main.d
+2-1
Original file line number
Diff line number
Diff line change
@@ -151,8 +151,9 @@ int main(string[] cliArgs) {
151
151
}
152
152
153
153
// Determine the application logging verbosity
154
+
// - As these flags are used to reduce application processing when not required, specifically in a 'debug' scenario, both verboseLogging and debugLogging need to be enabled
154
155
if (verbosityCount ==1) { verboseLogging = true;} // set __gshared bool verboseLogging in log.d
155
-
if (verbosityCount >=2) { debugLogging = true;} // set __gshared bool debugLogging in log.d
156
+
if (verbosityCount >=2) { verboseLogging = true; debugLogging = true;} // set __gshared bool verboseLogging & debugLogging in log.d
156
157
157
158
// Initialize the application logging class, as we know the application verbosity level
158
159
// If we need to enable logging to a file, we can only do this once we know the application configuration which is done slightly later on
Copy file name to clipboardexpand all lines: src/onedrive.d
+32-5
Original file line number
Diff line number
Diff line change
@@ -572,9 +572,18 @@ class OneDriveApi {
572
572
// After you have finished receiving all the changes, you may apply them to your local state. To check for changes in the future, call delta again with the @odata.deltaLink from the previous successful response.
if (debugLogging) {addLogEntry("Adding 'Include-Feature=AddToOneDrive' API request header as 'sync_business_shared_items' config option is enabled", ["debug"]);}
842
+
if (appConfig.accountType =="personal") {
843
+
// Add logging message for OneDrive Personal Accounts
844
+
if (debugLogging) {addLogEntry("Adding 'Include-Feature=AddToOneDrive' API request header for OneDrive Personal Account Type", ["debug"]);}
845
+
} else {
846
+
// Add logging message for OneDrive Business Accounts
847
+
if (debugLogging) {addLogEntry("Adding 'Include-Feature=AddToOneDrive' API request header as 'sync_business_shared_items' config option is enabled", ["debug"]);}
0 commit comments