cloudtools / cloudtools/gghelper

Authentication (and other) errors cause segfault

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
8
Forks
3
PR merge metrics
No merged PRs in 30d

Description

When using the creategroup subcommand, authentication errors and other user errors cause nil-pointer references and segfaults.

Here is an example:

```
[ggc@prome-2n-dhcp71:~$ ./gghelper_linux creategroup -name test
CreateCore error: UnrecognizedClientException: The security token included in the request is invalid.
status code: 403, request id: 846d2db5-0baf-11e8-8b00-a353ea141895
Created core 'test'
CreateCoreDefinition error: UnrecognizedClientException: The security token included in the request is invalid.
status code: 403, request id: 84a9259f-0baf-11e8-8a0f-295e0f4132bf
Error: UnrecognizedClientException: The security token included in the request is invalid.
status code: 403, request id: 84a9259f-0baf-11e8-8a0f-295e0f4132bf
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x70e7ee]

goroutine 1 [running]:
github.com/cloudtools/gghelper.(*GreengrassSession).GetConfigArchive(0xc420154000, 0x0)
/Users/mark/go/src/github.com/cloudtools/gghelper/archive.go:37 +0x19e
main.CreateGroup(0xc42000e0a0, 0x2, 0x2)
/Users/mark/go/src/github.com/cloudtools/gghelper/cmd/gghelper/group.go:36 +0x2cc
main.main()
/Users/mark/go/src/github.com/cloudtools/gghelper/cmd/gghelper/gghelper.go:40 +0x637
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.