Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

all: Apply codeql fixes

Aaron Gokaslan745c0af57146
diff --git a/backend/onedrive/onedrive.go b/backend/onedrive/onedrive.go
index e7674c019..ed8e140ef 100644
--- a/backend/onedrive/onedrive.go
+++ b/backend/onedrive/onedrive.go
@@ -511,7 +511,7 @@ Example: "https://contoso.sharepoint.com/sites/mysite" or "mysite"
`)
case "url_end":
siteURL := config.Result
- re := regexp.MustCompile(`https://.*\.sharepoint.com/sites/(.*)`)
+ re := regexp.MustCompile(`https://.*\.sharepoint\.com/sites/(.*)`)
match := re.FindStringSubmatch(siteURL)
if len(match) == 2 {
return chooseDrive(ctx, name, m, srv, chooseDriveOpt{
diff --git a/backend/uptobox/uptobox.go b/backend/uptobox/uptobox.go
index 172d50f75..c13d0ac9e 100644
--- a/backend/uptobox/uptobox.go
+++ b/backend/uptobox/uptobox.go
@@ -214,7 +214,7 @@ func NewFs(ctx context.Context, name string, root string, config configmap.Mappe
client := fshttp.NewClient(ctx)
f.srv = rest.NewClient(client).SetRoot(apiBaseURL)
- f.IDRegexp = regexp.MustCompile("https://uptobox.com/([a-zA-Z0-9]+)")
+ f.IDRegexp = regexp.MustCompile(`https://uptobox\.com/([a-zA-Z0-9]+)`)
_, err = f.readMetaDataForPath(ctx, f.dirPath(""), &api.MetadataRequestOptions{Limit: 10})
if err != nil {
diff --git a/vfs/vfsflags/filemode.go b/vfs/vfsflags/filemode.go
index b1c2e8bcd..a6a69f610 100644
--- a/vfs/vfsflags/filemode.go
+++ b/vfs/vfsflags/filemode.go
@@ -18,7 +18,7 @@ func (x *FileMode) String() string {
// Set a FileMode
func (x *FileMode) Set(s string) error {
- i, err := strconv.ParseInt(s, 8, 64)
+ i, err := strconv.ParseInt(s, 8, 32)
if err != nil {
return fmt.Errorf("bad FileMode - must be octal digits: %w", err)
}