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

crash with empty password & username #2

Open
individual-it opened this issue Dec 26, 2020 · 0 comments
Open

crash with empty password & username #2

individual-it opened this issue Dec 26, 2020 · 0 comments

Comments

@individual-it
Copy link

set HTTP username and password to an empty string and start hmb

export AUTH_USERNAME=
export AUTH_PASSWORD=
./hmb s --mqtt-host=tcp://10.4.1.1:1883

[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /ping                     --> main.SetupGin.func1 (3 handlers)
[GIN-debug] GET    /                         --> main.SetupGin.func2 (3 handlers)
panic: User can not be empty

goroutine 1 [running]:
github.com/gin-gonic/gin.assert1(...)
	/home/pi/go/pkg/mod/github.com/gin-gonic/[email protected]/utils.go:79
github.com/gin-gonic/gin.processAccounts(0x2997adc, 0x5eaac9, 0xc, 0x2997a70)
	/home/pi/go/pkg/mod/github.com/gin-gonic/[email protected]/auth.go:75 +0x28c
github.com/gin-gonic/gin.BasicAuthForRealm(0x2997adc, 0x281e0c0, 0x24, 0x0)
	/home/pi/go/pkg/mod/github.com/gin-gonic/[email protected]/auth.go:48 +0xec
github.com/gin-gonic/gin.BasicAuth(...)
	/home/pi/go/pkg/mod/github.com/gin-gonic/[email protected]/auth.go:68
main.SetupGin(0x298aa40, 0x0)
	/home/pi/http-mqtt-bridge/main.go:158 +0x168
main.Setup(0x298aa40)
	/home/pi/http-mqtt-bridge/main.go:124 +0x28
main.main.func2(0x29d00b0, 0x0, 0x29d00b0)
	/home/pi/http-mqtt-bridge/main.go:91 +0x28
github.com/urfave/cli.HandleAction(0x555bf8, 0x60f298, 0x29d00b0, 0x2980400, 0x0)
	/home/pi/go/pkg/mod/github.com/urfave/[email protected]/app.go:490 +0x68
github.com/urfave/cli.Command.Run(0x5e5bbb, 0x5, 0x0, 0x0, 0x29841b0, 0x1, 0x1, 0x5ede0e, 0x11, 0x0, ...)
	/home/pi/go/pkg/mod/github.com/urfave/[email protected]/command.go:210 +0x780
github.com/urfave/cli.(*App).Run(0x29b00e0, 0x289a0e0, 0x3, 0x4, 0x0, 0x0)
	/home/pi/go/pkg/mod/github.com/urfave/[email protected]/app.go:255 +0x504
main.main()
	/home/pi/http-mqtt-bridge/main.go:97 +0x464
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

1 participant