Closed goulashify closed 8 years ago
Records in Erlang do not perform type checks for field values (Erlang is dynamically typed) but some kind of validation can be considered. Please take this to the mailing list.
@michaelklishin Cool, thanks! In the meantime, would it be reasonable to educate users about this behaviour (by placing some kind of warning or something in readme.md
maybe) that they shouldn't use this option when using this plugin?
Unfortunately users do not read READMEs before using things. Again, this needs a discussion and we do not use GitHub issues for discussions. Please take this to the mailing list.
BTW I think it's a pretty actionable issue.
Callback spec https://github.com/rabbitmq/rabbitmq-common/blob/3885ca1967b1b340c10f7110b67fcb414f2dfda4/src/rabbit_authz_backend.erl#L49 needs to be updated to include (or be completely replaced with) #authz_socket_info{}
. Maybe the record itself should also be covered with specs.
And then this plugin should be taught how to handle all inputs that are covered by the specs above.
Good afternoon!:)
I'm through 1.5 days of debugging and magicking, I happened to be so brave that i've enabled
reverse_dns_lookups
(set to true) at the config meanwhile using bothweb-stomp
andauth-http-backend
plugins.Since there's no record defined for
Sock
, by enablingreverse_dns_lookups
it was perfectly possible to passinstead of
to extract_address(), which would pass the bitstring (instead of the tuple) to the function
inet_parse:ntoa()
, which would throw an error since it only accepts ip addresses in a tuple format.I have no major experience in Erlang, although i would suggest to define a record for the
Sock
so it can be verified that it's thehostname bitstring
or theip tuple
type of socket it's passing around.TL;DR: People of RabbitMQ, beware, don't use
reverse_dns_lookups
withweb-stomp
andauth-http-backend
.Let me know if there's been a decision or so regarding what approach should be taken in order to fix it, i might be able to create a PR for it.
This error happens when calling
check_vhost_access
afteruser_login_authentication
, find the stack trace here please.Cheers, -Dan