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

Should password hashing helper functions use base64 encoding? #159

Closed
mammothbane opened this issue Jul 15, 2020 · 4 comments
Closed

Should password hashing helper functions use base64 encoding? #159

mammothbane opened this issue Jul 15, 2020 · 4 comments
Milestone

Comments

@mammothbane
Copy link

I tried using the password hashing functions provided by this package, but RabbitMQ was rejecting them (Rabbit v3.8.x). I reimplemented these functions myself, and I discovered that RabbitMQ doesn't understand base64 url encoding.

I'd make a PR, but there seem to be tests that should cover this, so I'm not sure if this is an incompatibility between RabbitMQ versions, and I don't have the time in the short term to sort that out.

@mammothbane mammothbane changed the title password hashing functions use url encoding when rabbitmq expects standard encoding password hashing functions use base64 url encoding when rabbitmq expects standard encoding Jul 15, 2020
@michaelklishin
Copy link
Owner

I cannot comment on what may be going on since you haven't provided any examples.

RabbitMQ HTTP API endpoint that creates or updates user records hasn't changed since 3.6.7 or so, rabbitmq/rabbitmq-management@44c1a5e#diff-c4fc8e74da6d82775c07e60925c441db is the most recent meaningful change.

There are rabbitmqadmin tests for the endpoint that do use base64.

The function that endpoint relies on, this one, does not perform any Base64-encoding.

@michaelklishin michaelklishin changed the title password hashing functions use base64 url encoding when rabbitmq expects standard encoding Should password hashing helper functions use base64 encoding? Jul 15, 2020
@michaelklishin
Copy link
Owner

michaelklishin commented Jul 15, 2020

I cannot reproduce. Most likely your code performed double base64 encoding or something of that kind. Closing but if/when actual evidence is posted we can take another look.

@michaelklishin
Copy link
Owner

For a reason that escapes me, the new tests fail on Go 1.13 and tip but not on 1.14.

@michaelklishin
Copy link
Owner

This was due to my attempt at addressing #160.

@michaelklishin michaelklishin added this to the 2.3.1 milestone Jul 16, 2020
@michaelklishin michaelklishin modified the milestones: 2.3.1, 2.4.0 Aug 7, 2020
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