diff --git a/amazonclouddrive/amazonclouddrive.go b/amazonclouddrive/amazonclouddrive.go index 094d04814..3ed58029a 100644 --- a/amazonclouddrive/amazonclouddrive.go +++ b/amazonclouddrive/amazonclouddrive.go @@ -32,15 +32,15 @@ import ( ) const ( - rcloneClientID = "amzn1.application-oa2-client.6bf18d2d1f5b485c94c8988bb03ad0e7" - rcloneClientSecret = "k8/NyszKm5vEkZXAwsbGkd6C3NrbjIqMg4qEhIeF14Szub2wur+/teS3ubXgsLe9//+tr/qoqK+lq6mg8vWkoA==" - folderKind = "FOLDER" - fileKind = "FILE" - assetKind = "ASSET" - statusAvailable = "AVAILABLE" - timeFormat = time.RFC3339 // 2014-03-07T22:31:12.173Z - minSleep = 20 * time.Millisecond - warnFileSize = 50 << 30 // Display warning for files larger than this size + rcloneClientID = "amzn1.application-oa2-client.6bf18d2d1f5b485c94c8988bb03ad0e7" + rcloneEncryptedClientSecret = "k8/NyszKm5vEkZXAwsbGkd6C3NrbjIqMg4qEhIeF14Szub2wur+/teS3ubXgsLe9//+tr/qoqK+lq6mg8vWkoA==" + folderKind = "FOLDER" + fileKind = "FILE" + assetKind = "ASSET" + statusAvailable = "AVAILABLE" + timeFormat = time.RFC3339 // 2014-03-07T22:31:12.173Z + minSleep = 20 * time.Millisecond + warnFileSize = 50 << 30 // Display warning for files larger than this size ) // Globals @@ -55,7 +55,7 @@ var ( TokenURL: "https://api.amazon.com/auth/o2/token", }, ClientID: rcloneClientID, - ClientSecret: fs.Reveal(rcloneClientSecret), + ClientSecret: fs.Reveal(rcloneEncryptedClientSecret), RedirectURL: oauthutil.RedirectURL, } ) diff --git a/drive/drive.go b/drive/drive.go index eb65d24a4..7314053a5 100644 --- a/drive/drive.go +++ b/drive/drive.go @@ -30,15 +30,15 @@ import ( // Constants const ( - rcloneClientID = "202264815644.apps.googleusercontent.com" - rcloneClientSecret = "8p/yms3OlNXE9OTDl/HLypf9gdiJ5cT3" - driveFolderType = "application/vnd.google-apps.folder" - timeFormatIn = time.RFC3339 - timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00" - minSleep = 10 * time.Millisecond - maxSleep = 2 * time.Second - decayConstant = 2 // bigger for slower decay, exponential - defaultExtensions = "docx,xlsx,pptx,svg" + rcloneClientID = "202264815644.apps.googleusercontent.com" + rcloneEncryptedClientSecret = "8p/yms3OlNXE9OTDl/HLypf9gdiJ5cT3" + driveFolderType = "application/vnd.google-apps.folder" + timeFormatIn = time.RFC3339 + timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00" + minSleep = 10 * time.Millisecond + maxSleep = 2 * time.Second + decayConstant = 2 // bigger for slower decay, exponential + defaultExtensions = "docx,xlsx,pptx,svg" ) // Globals @@ -57,7 +57,7 @@ var ( Scopes: []string{"https://www.googleapis.com/auth/drive"}, Endpoint: google.Endpoint, ClientID: rcloneClientID, - ClientSecret: fs.Reveal(rcloneClientSecret), + ClientSecret: fs.Reveal(rcloneEncryptedClientSecret), RedirectURL: oauthutil.TitleBarRedirectURL, } mimeTypeToExtension = map[string]string{ diff --git a/dropbox/dropbox.go b/dropbox/dropbox.go index 7ae1cc4ef..146461494 100644 --- a/dropbox/dropbox.go +++ b/dropbox/dropbox.go @@ -27,9 +27,9 @@ import ( // Constants const ( - rcloneAppKey = "5jcck7diasz0rqy" - rcloneAppSecret = "m8WRxJ6b1Z/Y25fDwJWS" - metadataLimit = dropbox.MetadataLimitDefault // max items to fetch at once + rcloneAppKey = "5jcck7diasz0rqy" + rcloneEncryptedAppSecret = "m8WRxJ6b1Z/Y25fDwJWS" + metadataLimit = dropbox.MetadataLimitDefault // max items to fetch at once ) var ( @@ -138,7 +138,7 @@ func newDropbox(name string) (*dropbox.Dropbox, error) { } appSecret := fs.ConfigFile.MustValue(name, "app_secret") if appSecret == "" { - appSecret = fs.Reveal(rcloneAppSecret) + appSecret = fs.Reveal(rcloneEncryptedAppSecret) } err := db.SetAppInfo(appKey, appSecret) diff --git a/googlecloudstorage/googlecloudstorage.go b/googlecloudstorage/googlecloudstorage.go index fad5883fd..3ffcab2dc 100644 --- a/googlecloudstorage/googlecloudstorage.go +++ b/googlecloudstorage/googlecloudstorage.go @@ -34,12 +34,12 @@ import ( ) const ( - rcloneClientID = "202264815644.apps.googleusercontent.com" - rcloneClientSecret = "8p/yms3OlNXE9OTDl/HLypf9gdiJ5cT3" - timeFormatIn = time.RFC3339 - timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00" - metaMtime = "mtime" // key to store mtime under in metadata - listChunks = 256 // chunk size to read directory listings + rcloneClientID = "202264815644.apps.googleusercontent.com" + rcloneEncryptedClientSecret = "8p/yms3OlNXE9OTDl/HLypf9gdiJ5cT3" + timeFormatIn = time.RFC3339 + timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00" + metaMtime = "mtime" // key to store mtime under in metadata + listChunks = 256 // chunk size to read directory listings ) var ( @@ -48,7 +48,7 @@ var ( Scopes: []string{storage.DevstorageFullControlScope}, Endpoint: google.Endpoint, ClientID: rcloneClientID, - ClientSecret: fs.Reveal(rcloneClientSecret), + ClientSecret: fs.Reveal(rcloneEncryptedClientSecret), RedirectURL: oauthutil.TitleBarRedirectURL, } ) diff --git a/hubic/hubic.go b/hubic/hubic.go index 2fc63faac..3ea3584e5 100644 --- a/hubic/hubic.go +++ b/hubic/hubic.go @@ -21,8 +21,8 @@ import ( ) const ( - rcloneClientID = "api_hubic_svWP970PvSWbw5G3PzrAqZ6X2uHeZBPI" - rcloneClientSecret = "8MrG3pjWyJya4OnO9ZTS4emI+9fa1ouPgvfD2MbTzfDYvO/H5czFxsTXtcji4/Hz3snz8/CrzMzlxvP9//Ty/Q==" + rcloneClientID = "api_hubic_svWP970PvSWbw5G3PzrAqZ6X2uHeZBPI" + rcloneEncryptedClientSecret = "8MrG3pjWyJya4OnO9ZTS4emI+9fa1ouPgvfD2MbTzfDYvO/H5czFxsTXtcji4/Hz3snz8/CrzMzlxvP9//Ty/Q==" ) // Globals @@ -37,7 +37,7 @@ var ( TokenURL: "https://api.hubic.com/oauth/token/", }, ClientID: rcloneClientID, - ClientSecret: fs.Reveal(rcloneClientSecret), + ClientSecret: fs.Reveal(rcloneEncryptedClientSecret), RedirectURL: oauthutil.RedirectLocalhostURL, } ) diff --git a/onedrive/onedrive.go b/onedrive/onedrive.go index fc557cc36..d8d9704c1 100644 --- a/onedrive/onedrive.go +++ b/onedrive/onedrive.go @@ -24,12 +24,12 @@ import ( ) const ( - rcloneClientID = "0000000044165769" - rcloneClientSecret = "0+be4+jYw+7018HY6P3t/Izo+pTc+Yvt8+fy8NHU094=" - minSleep = 10 * time.Millisecond - maxSleep = 2 * time.Second - decayConstant = 2 // bigger for slower decay, exponential - rootURL = "https://api.onedrive.com/v1.0" // root URL for requests + rcloneClientID = "0000000044165769" + rcloneEncryptedClientSecret = "0+be4+jYw+7018HY6P3t/Izo+pTc+Yvt8+fy8NHU094=" + minSleep = 10 * time.Millisecond + maxSleep = 2 * time.Second + decayConstant = 2 // bigger for slower decay, exponential + rootURL = "https://api.onedrive.com/v1.0" // root URL for requests ) // Globals @@ -46,7 +46,7 @@ var ( TokenURL: "https://login.live.com/oauth20_token.srf", }, ClientID: rcloneClientID, - ClientSecret: fs.Reveal(rcloneClientSecret), + ClientSecret: fs.Reveal(rcloneEncryptedClientSecret), RedirectURL: oauthutil.RedirectPublicURL, } chunkSize = fs.SizeSuffix(10 * 1024 * 1024) diff --git a/yandex/yandex.go b/yandex/yandex.go index 837fbba0b..ced1bbb4f 100644 --- a/yandex/yandex.go +++ b/yandex/yandex.go @@ -21,8 +21,8 @@ import ( //oAuth const ( - rcloneClientID = "ac39b43b9eba4cae8ffb788c06d816a8" - rcloneClientSecret = "k8jKzZnMmM+Wx5jAksPAwYKPgImOiN+FhNKD09KBg9A=" + rcloneClientID = "ac39b43b9eba4cae8ffb788c06d816a8" + rcloneEncryptedClientSecret = "k8jKzZnMmM+Wx5jAksPAwYKPgImOiN+FhNKD09KBg9A=" ) // Globals @@ -34,7 +34,7 @@ var ( TokenURL: "https://oauth.yandex.com/token", //same as https://oauth.yandex.ru/token }, ClientID: rcloneClientID, - ClientSecret: fs.Reveal(rcloneClientSecret), + ClientSecret: fs.Reveal(rcloneEncryptedClientSecret), RedirectURL: oauthutil.RedirectURL, } )