From 36157d8ae531e4728f4664de376850317158e64a Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 17 Jan 2020 21:42:32 +0000 Subject: [PATCH] vendor: update t3rm1n4l/go-mega - fixes mega: couldn't login: crypto/aes: invalid key size 0 Fixes #3740 --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/t3rm1n4l/go-mega/mega.go | 8 ++++++-- vendor/modules.txt | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index d6ed0286c..13f7d3363 100644 --- a/go.mod +++ b/go.mod @@ -50,7 +50,7 @@ require ( github.com/spf13/cobra v0.0.5 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.4.0 - github.com/t3rm1n4l/go-mega v0.0.0-20200111163430-ad0abe77ec81 + github.com/t3rm1n4l/go-mega v0.0.0-20200117211730-79a813bb328d github.com/xanzy/ssh-agent v0.2.1 github.com/youmark/pkcs8 v0.0.0-20191102193632-94c173a94d60 github.com/yunify/qingstor-sdk-go/v3 v3.1.1 diff --git a/go.sum b/go.sum index 73ab4eb22..d7e51010a 100644 --- a/go.sum +++ b/go.sum @@ -251,8 +251,8 @@ github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709 h1:Ko2LQMrRU+Oy github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/t3rm1n4l/go-mega v0.0.0-20200111163430-ad0abe77ec81 h1:VEZ6xZtFfxY5urHL/baBvXKSJBYTc9c51WhPprpWKjQ= -github.com/t3rm1n4l/go-mega v0.0.0-20200111163430-ad0abe77ec81/go.mod h1:XWL4vDyd3JKmJx+hZWUVgCNmmhZ2dTBcaNDcxH465s0= +github.com/t3rm1n4l/go-mega v0.0.0-20200117211730-79a813bb328d h1:GsRmok9VXIEc5B6SmRWuuO9hx4x2YBqFqgOXGt9Xs94= +github.com/t3rm1n4l/go-mega v0.0.0-20200117211730-79a813bb328d/go.mod h1:XWL4vDyd3JKmJx+hZWUVgCNmmhZ2dTBcaNDcxH465s0= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c h1:u6SKchux2yDvFQnDHS3lPnIRmfVJ5Sxy3ao2SIdysLQ= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= diff --git a/vendor/github.com/t3rm1n4l/go-mega/mega.go b/vendor/github.com/t3rm1n4l/go-mega/mega.go index 8e829d6e4..ba5e07048 100644 --- a/vendor/github.com/t3rm1n4l/go-mega/mega.go +++ b/vendor/github.com/t3rm1n4l/go-mega/mega.go @@ -759,7 +759,10 @@ func (m *Mega) addFSNode(itm FSNode) (*Node, error) { } // Shared file default: - k := m.FS.skmap[itemUser] + k, ok := m.FS.skmap[itemUser] + if !ok { + return nil, errors.New("couldn't find decryption key for shared file") + } b, err := base64urldecode(k) if err != nil { return nil, err @@ -930,7 +933,8 @@ func (m *Mega) getFileSystem() error { for _, itm := range res[0].F { _, err = m.addFSNode(itm) if err != nil { - return err + m.debugf("couldn't decode FSNode %#v: %v ", itm, err) + continue } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 9fc7b7ad9..936578dd0 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -166,7 +166,7 @@ github.com/spf13/pflag # github.com/stretchr/testify v1.4.0 github.com/stretchr/testify/assert github.com/stretchr/testify/require -# github.com/t3rm1n4l/go-mega v0.0.0-20200111163430-ad0abe77ec81 +# github.com/t3rm1n4l/go-mega v0.0.0-20200117211730-79a813bb328d github.com/t3rm1n4l/go-mega # github.com/xanzy/ssh-agent v0.2.1 github.com/xanzy/ssh-agent