Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when creating malformed URL #853

Closed
amc90 opened this issue Jun 6, 2018 · 1 comment
Closed

Segfault when creating malformed URL #853

amc90 opened this issue Jun 6, 2018 · 1 comment
Assignees

Comments

@amc90
Copy link

amc90 commented Jun 6, 2018

Summary

Segfault when creating malformed URL

Steps To Reproduce

  • gopass create
  • [Press enter on "website login"]
  • [Type "a test" in field one]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x561242]

goroutine 1 [running]:
net/url.(*URL).Hostname(0x0, 0xd, 0x0)
        /usr/lib/go-1.10/src/net/url/url.go:1026 +0x22
github.com/gopasspw/gopass/pkg/action/create.extractHostname(0xc420446052, 0x6, 0xc42044a040, 0x35)
        /home/user/go/src/github.com/gopasspw/gopass/pkg/action/create/create.go:81 +0x94
github.com/gopasspw/gopass/pkg/action/create.(*creator).createWebsite(0xc4202bda40, 0xdce820, 0xc4202d4750, 0xc420334160, 0x39, 0xd4cb0f)
        /home/user/go/src/github.com/gopasspw/gopass/pkg/action/create/create.go:104 +0x1c6
github.com/gopasspw/gopass/pkg/action/create.(*creator).(github.com/gopasspw/gopass/pkg/action/create.createWebsite)-fm(0xdce820, 0xc4202d4750, 0xc420334160, 0x0, 0x0)
        /home/user/go/src/github.com/gopasspw/gopass/pkg/action/create/create.go:52 +0x48
github.com/gopasspw/gopass/pkg/cui.Actions.Run(0xc4201739e8, 0x5, 0x5, 0xdce820, 0xc4202d4750, 0xc420334160, 0x0, 0x5, 0x5)
        /home/user/go/src/github.com/gopasspw/gopass/pkg/cui/actions.go:36 +0x124
github.com/gopasspw/gopass/pkg/action/create.Create(0xdce820, 0xc4202d4750, 0xc420334160, 0xdcc9e0, 0xc4202c4300, 0xb33126, 0xc4202f3260)
        /home/user/go/src/github.com/gopasspw/gopass/pkg/action/create/create.go:62 +0x410
main.getCommands.func28(0xc420334160, 0x0, 0xc4202f3260)
        /home/user/go/src/github.com/gopasspw/gopass/commands.go:289 +0x86
github.com/gopasspw/gopass/vendor/github.com/urfave/cli.HandleAction(0xbcf4e0, 0xc4202be420, 0xc420334160, 0x0, 0xc4202c1560)
        /home/user/go/src/github.com/gopasspw/gopass/vendor/github.com/urfave/cli/app.go:501 +0xc8
github.com/gopasspw/gopass/vendor/github.com/urfave/cli.Command.Run(0xcf6a3a, 0x6, 0x0, 0x0, 0xc4202bc800, 0x1, 0x1, 0xd35cb6, 0x1c, 0x0, ...)
        /home/user/go/src/github.com/gopasspw/gopass/vendor/github.com/urfave/cli/command.go:165 +0x47d
github.com/gopasspw/gopass/vendor/github.com/urfave/cli.(*App).Run(0xc42030e000, 0xc42000c060, 0x2, 0x2, 0x0, 0x0)
        /home/user/go/src/github.com/gopasspw/gopass/vendor/github.com/urfave/cli/app.go:259 +0x6e8
main.main()
        /home/user/go/src/github.com/gopasspw/gopass/main.go:64 +0x2d7

Environment

gopass 1.7.2-git+HEAD go1.10.2 linux amd64
Linux xx 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux

Thanks

@dominikschulz
Copy link
Member

Thanks for reporting this issue. Should be easy to fix.

@dominikschulz dominikschulz self-assigned this Jun 6, 2018
dominikschulz added a commit to dominikschulz/gopass that referenced this issue Jun 6, 2018
@dominikschulz dominikschulz added this to the 1.8.1 - Bugfix relase milestone Jun 6, 2018
dominikschulz added a commit that referenced this issue Jun 6, 2018
kpitt pushed a commit to kpitt/gopass that referenced this issue Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants