-
- Downloads
Don't display the `is_admin?` flag for user API responses.
- To prevent an attacker from enumerating the `/users` API to get a list of all the admins. - Display the `is_admin?` flag wherever we display the `private_token` - at the moment, there are two instances: - When an admin uses `sudo` to view the `/user` endpoint - When logging in using the `/session` endpoint
Showing
- lib/api/entities.rb 2 additions, 2 deletionslib/api/entities.rb
- lib/api/session.rb 2 additions, 2 deletionslib/api/session.rb
- lib/api/users.rb 1 addition, 1 deletionlib/api/users.rb
- spec/fixtures/api/schemas/public_api/v4/user/public.json 0 additions, 2 deletionsspec/fixtures/api/schemas/public_api/v4/user/public.json
- spec/requests/api/keys_spec.rb 6 additions, 0 deletionsspec/requests/api/keys_spec.rb
- spec/requests/api/users_spec.rb 6 additions, 2 deletionsspec/requests/api/users_spec.rb
- spec/requests/api/v3/users_spec.rb 6 additions, 0 deletionsspec/requests/api/v3/users_spec.rb
Please register or sign in to comment