merklecounty / rget

download URLs and verify the contents against a publicly recorded cryptographic log
https://merklecounty.com
Apache License 2.0
205 stars 17 forks source link

`rget submit` panics #23

Closed luxas closed 5 years ago

luxas commented 5 years ago

Hi @philips, thanks for this project :smile:!

I tried it out, and found a nil panic for rget submit:

$ rget submit
panic: runtime error: index out of range

goroutine 1 [running]:
go.merklecounty.com/rget/rget/cmd.submit(0x17840c0, 0x17afae0, 0x0, 0x0)
    /home/brandon/src/github.com/merklecounty/rget/rget/cmd/submit.go:45 +0x63f
github.com/spf13/cobra.(*Command).execute(0x17840c0, 0x17afae0, 0x0, 0x0, 0x17840c0, 0x17afae0)
    /home/brandon/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0x1784840, 0xc0001d3f68, 0xc83f3e, 0x1784840)
    /home/brandon/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fc
github.com/spf13/cobra.(*Command).Execute(...)
    /home/brandon/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
go.merklecounty.com/rget/rget/cmd.Execute()
    /home/brandon/src/github.com/merklecounty/rget/rget/cmd/root.go:64 +0x32
main.main()
    /home/brandon/src/github.com/merklecounty/rget/rget/main.go:20 +0x20
philips commented 5 years ago

Haha don't do that.

I will try and get a fix in in the next release.

On Tue, Aug 6, 2019, 10:27 PM Lucas Käldström notifications@github.com wrote:

Hi @philips https://github.com/philips, thanks for this project 😄!

I tried it out, and found a nil panic for rget submit:

$ rget submit

panic: runtime error: index out of range

goroutine 1 [running]: go.merklecounty.com/rget/rget/cmd.submit(0x17840c0, 0x17afae0, 0x0, 0x0)

/home/brandon/src/github.com/merklecounty/rget/rget/cmd/submit.go:45 +0x63f github.com/spf13/cobra.(*Command).execute(0x17840c0, 0x17afae0, 0x0, 0x0, 0x17840c0, 0x17afae0)

/home/brandon/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x2ae github.com/spf13/cobra.(*Command).ExecuteC(0x1784840, 0xc0001d3f68, 0xc83f3e, 0x1784840)

/home/brandon/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fc github.com/spf13/cobra.(*Command).Execute(...)

/home/brandon/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864 go.merklecounty.com/rget/rget/cmd.Execute()

/home/brandon/src/github.com/merklecounty/rget/rget/cmd/root.go:64 +0x32

main.main()

/home/brandon/src/github.com/merklecounty/rget/rget/main.go:20 +0x20

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/merklecounty/rget/issues/23?email_source=notifications&email_token=AAAIGCGTZASILPKAHI75CHTQDJMMFA5CNFSM4IJ4P2M2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDZK6WQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAIGCBQS2SE4XNBSY2CV43QDJMMFANCNFSM4IJ4P2MQ .