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

GET /api/connections/username/{username} fails with a 500 #8482

Closed
SimonUnge opened this issue Jun 5, 2023 · 1 comment · Fixed by #8483
Closed

GET /api/connections/username/{username} fails with a 500 #8482

SimonUnge opened this issue Jun 5, 2023 · 1 comment · Fixed by #8483
Labels
Milestone

Comments

@SimonUnge
Copy link
Collaborator

Describe the bug

Calling GET /api/connections/username as a policymaker/management user leads to 500 internal error.

Calling DETETE on /api/connections/username as policymaker/monitor/management user leads to 500 internal error.

Reproduction steps

  1. Create a user with policymaker tag
  2. run GET on /api/connections/username/SOMEOTHERUSER
    ...

Expected behavior

401 Unauthorized

Additional context

No response

@michaelklishin
Copy link
Member

Here is the stack trace:

exception error: bad argument
  in function  lists:keyfind/3
  called as lists:keyfind(user,1,not_found)
   *** argument 3: not a list
  in call from rabbit_misc:pget/2 (rabbit_misc.erl, line 899)
  in call from rabbit_mgmt_util:'-is_authorized_user/3-fun-0-'/3 (rabbit_mgmt_util.erl, line 188)
  in call from rabbit_mgmt_util:is_authorized/7 (rabbit_mgmt_util.erl, line 285)
  in call from rabbit_mgmt_wm_connection:is_authorized/2 (rabbit_mgmt_wm_connection.erl, line 63)
  in call from cowboy_rest:call/3 (cowboy_rest.erl, line 1583)
  in call from cowboy_rest:is_authorized/2 (cowboy_rest.erl, line 368)
  in call from cowboy_rest:upgrade/4 (cowboy_rest.erl, line 284)

@michaelklishin michaelklishin changed the title /api/connections/username internal error GET /api/connections/username/{username} fails with a 500 Jun 6, 2023
michaelklishin added a commit to michaelklishin/rabbit-hole that referenced this issue Jun 6, 2023
michaelklishin added a commit to michaelklishin/rabbit-hole that referenced this issue Jun 6, 2023
michaelklishin added a commit to rabbitmq/hop that referenced this issue Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants