1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

onedrive: default onedrive personal to QuickXorHash

Before this change the hash used for Onedrive Personal was SHA1. From
July 2023 Microsoft is phasing out SHA1 hashes in favour of
QuickXorHash in Onedrive Personal. Onedrive Business and Sharepoint
remain using QuickXorHash as before.

This choice can be changed using the --onedrive-hash-type flag (and
config option) so that SHA1 can be selected while it is still
available in the transition period.

See: https://forum.rclone.org/t/microsoft-is-switching-onedrive-personal-to-quickxorhash-from-sha1/36296/
This commit is contained in:
Nick Craig-Wood
2023-03-01 12:07:27 +00:00
parent dfe4e78a77
commit 23d17b76be
3 changed files with 23 additions and 13 deletions

View File

@@ -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 {