diff --git a/backend/onedrive/onedrive.go b/backend/onedrive/onedrive.go index 357933b00..f0fe628f6 100644 --- a/backend/onedrive/onedrive.go +++ b/backend/onedrive/onedrive.go @@ -265,8 +265,15 @@ At the time of writing this only works with OneDrive personal paid accounts. Help: `Specify the hash in use for the backend. This specifies the hash type in use. If set to "auto" it will use the -default hash which is is SHA1 for OneDrive Personal and QuickXorHash -for OneDrive Business and Sharepoint. +default hash which is is QuickXorHash. + +Before rclone 1.62 an SHA1 hash was used by default for Onedrive +Personal. For 1.62 and later the default is to use a QuickXorHash for +all onedrive types. If an SHA1 hash is desired then set this option +accordingly. + +From July 2023 QuickXorHash will be the only available hash for +both OneDrive for Business and OneDriver Personal. This can be set to "none" to not use any hashes. @@ -930,11 +937,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e // Set the user defined hash if opt.HashType == "auto" || opt.HashType == "" { - if f.driveType == driveTypePersonal { - opt.HashType = hash.SHA1.String() - } else { - opt.HashType = QuickXorHashType.String() - } + opt.HashType = QuickXorHashType.String() } err = f.hashType.Set(opt.HashType) if err != nil { diff --git a/docs/content/onedrive.md b/docs/content/onedrive.md index 5f3a2cf3c..99a6e8053 100644 --- a/docs/content/onedrive.md +++ b/docs/content/onedrive.md @@ -168,10 +168,19 @@ OneDrive allows modification times to be set on objects accurate to 1 second. These will be used to detect whether objects need syncing or not. -OneDrive personal supports SHA1 type hashes. OneDrive for business and -Sharepoint Server support +OneDrive Personal, OneDrive for Business and Sharepoint Server support [QuickXorHash](https://docs.microsoft.com/en-us/onedrive/developer/code-snippets/quickxorhash). +Before rclone 1.62 the default hash for Onedrive Personal was `SHA1`. +For rclone 1.62 and above the default for all Onedrive backends is +`QuickXorHash`. + +Starting from July 2023 `SHA1` support is being phased out in Onedrive +Personal in favour of `QuickXorHash`. If necessary the +`--onedrive-hash-type` flag (or `hash_type` config option) can be used +to select `SHA1` during the transition period if this is important +your workflow. + For all types of OneDrive you can use the `--checksum` flag. ### Restricted filename characters diff --git a/docs/content/overview.md b/docs/content/overview.md index a9605c480..bee55abd4 100644 --- a/docs/content/overview.md +++ b/docs/content/overview.md @@ -39,7 +39,7 @@ Here is an overview of the major features of each cloud storage system. | Mega | - | - | No | Yes | - | - | | Memory | MD5 | R/W | No | No | - | - | | Microsoft Azure Blob Storage | MD5 | R/W | No | No | R/W | - | -| Microsoft OneDrive | SHA1 ⁵ | R/W | Yes | No | R | - | +| Microsoft OneDrive | QuickXorHash ⁵ | R/W | Yes | No | R | - | | OpenDrive | MD5 | R/W | Yes | Partial ⁸ | - | - | | OpenStack Swift | MD5 | R/W | No | No | R/W | - | | Oracle Object Storage | MD5 | R/W | No | No | R/W | - | @@ -72,9 +72,7 @@ This is an SHA256 sum of all the 4 MiB block SHA256s. ⁴ WebDAV supports modtimes when used with Owncloud and Nextcloud only. -⁵ Microsoft OneDrive Personal supports SHA1 hashes, whereas OneDrive -for business and SharePoint server support Microsoft's own -[QuickXorHash](https://docs.microsoft.com/en-us/onedrive/developer/code-snippets/quickxorhash). +⁵ [QuickXorHash](https://docs.microsoft.com/en-us/onedrive/developer/code-snippets/quickxorhash) is Microsoft's own hash. ⁶ Mail.ru uses its own modified SHA1 hash