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

Using wamp.session.list segfaults the router #175

Closed
johannwagner opened this issue May 17, 2019 · 1 comment
Closed

Using wamp.session.list segfaults the router #175

johannwagner opened this issue May 17, 2019 · 1 comment

Comments

@johannwagner
Copy link
Contributor

Hey,

I just tried to use wamp.session.list with an auth role filter, as described here.

My call using kraftfahrstrasse:

const [sessionListPromise] = socketConnection.Call('wamp.session.list', [['user']]);

Router Log:

interconnect_1           | panic: interface conversion: interface {} is []interface {}, not []string
interconnect_1           | 
interconnect_1           | goroutine 8 [running]:
interconnect_1           | github.com/EmbeddedEnterprises/autobahnkreuz/vendor/github.com/gammazero/nexus/router.(*realm).sessionList(0xc4201989c0, 0xc420179a00, 0x196520c5, 0x8a7d5c35da7c3d88)
interconnect_1           | 	/go/src/github.com/EmbeddedEnterprises/autobahnkreuz/vendor/github.com/gammazero/nexus/router/realm.go:829 +0x363
interconnect_1           | github.com/EmbeddedEnterprises/autobahnkreuz/vendor/github.com/gammazero/nexus/router.(*realm).(github.com/EmbeddedEnterprises/autobahnkreuz/vendor/github.com/gammazero/nexus/router.sessionList)-fm(0xc420179a00, 0xc420021350, 0x2)
interconnect_1           | 	/go/src/github.com/EmbeddedEnterprises/autobahnkreuz/vendor/github.com/gammazero/nexus/router/realm.go:267 +0x34
interconnect_1           | github.com/EmbeddedEnterprises/autobahnkreuz/vendor/github.com/gammazero/nexus/router.(*realm).metaProcedureHandler(0xc4201989c0)
interconnect_1           | 	/go/src/github.com/EmbeddedEnterprises/autobahnkreuz/vendor/github.com/gammazero/nexus/router/realm.go:774 +0x346
interconnect_1           | created by github.com/EmbeddedEnterprises/autobahnkreuz/vendor/github.com/gammazero/nexus/router.(*realm).run
interconnect_1           | 	/go/src/github.com/EmbeddedEnterprises/autobahnkreuz/vendor/github.com/gammazero/nexus/router/realm.go:298 +0x6cb
slimerp-service-deploy_interconnect_1 exited with code 2

https://github.com/gammazero/nexus/blob/master/router/realm.go#L829

I tried to figure out the issue in the code, but I was not able to and I think, I use this correctly. No matter what, this should not crash the entire router, even if this is not used correctly.

Best Regards,
Johann

@johannwagner
Copy link
Contributor Author

@martin31821 has figured out the bug. Working on PR.

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