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

Index out of range when receiving wrong token #3028

Open
milibopp opened this issue Jan 11, 2019 · 2 comments
Open

Index out of range when receiving wrong token #3028

milibopp opened this issue Jan 11, 2019 · 2 comments
Labels

Comments

@milibopp
Copy link

Bug Report

For some reason (not sure which yet) I appear to get a broken token when logging in to my Concourse instance with fly.

Steps to Reproduce

  1. Try to login with fly: fly -t something login -c http://yourserver:8080
  2. Get the server to answer with something invalid (again, don't know how I managed that).

Expected Results

The fly CLI should give me an error message about an invalid token supplied by the server.

Actual Results

The CLI crashes with this:

goroutine 1 [running]:
github.com/concourse/fly/commands.(*LoginCommand).authCodeGrant(0xca4900, 0xc042062100, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        C:/var/vcap/data/worker/work/containers/00002i7nadb/tmp/build/734c03a2/concourse/src/github.com/concourse/fly/commands/login.go:203 +0x6c4
github.com/concourse/fly/commands.(*LoginCommand).Execute(0xca4900, 0xc0420a2e10, 0x0, 0x5, 0xca4900, 0x1)
        C:/var/vcap/data/worker/work/containers/00002i7nadb/tmp/build/734c03a2/concourse/src/github.com/concourse/fly/commands/login.go:120 +0x603
github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc042104c00, 0xc04208c010, 0x5, 0x7, 0x8f31e0, 0xc0421a93f0, 0xc042081f28, 0x8902c6, 0xc04211a7e0)
        C:/var/vcap/data/worker/work/containers/00002i7nadb/tmp/build/734c03a2/concourse/src/github.com/jessevdk/go-flags/parser.go:316 +0x7e4
github.com/jessevdk/go-flags.(*Parser).Parse(0xc042104c00, 0x9c08dd, 0x8, 0xc04208c800, 0x0, 0xc0420595a0)
        C:/var/vcap/data/worker/work/containers/00002i7nadb/tmp/build/734c03a2/concourse/src/github.com/jessevdk/go-flags/parser.go:186 +0x78
main.main()
        C:/var/vcap/data/worker/work/containers/00002i7nadb/tmp/build/734c03a2/concourse/src/github.com/concourse/fly/main.go:24 +0x112

Version Info

  • Concourse version: 4.2.2
  • Deployment type (BOSH/Docker/binary): Docker
  • Infrastructure/IaaS: Azure
  • Browser (if applicable): Firefox
  • Did this used to work? Not that I know of.
@milibopp
Copy link
Author

I might have to add another bug, because I do not understand why the web instance gives me a token with no spaces in it, which on first glance seems to lead to the crash in commands/login.go:203. Nonetheless, I think the fly CLI should handle this more gracefully. There is a check for the command line input, but not for the message from the server.

@milibopp
Copy link
Author

Upon further investigation, I managed to login semi-automatically. Apparently, on the first try, the browser automatically redirected me to a success page without prompting me for username and password.

@vito vito removed the triage label Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants