TheHive-Project / TheHive-Project/Cortex
Cannot list users when organisation name contains underscores
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.6k
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
Cannot list users when organisation name contains underscores
Request Type
Bug
Work Environment
| Question | Answer |
|---|---|
| OS version (server) | CentOS |
| OS version (client) | CentOS |
| Cortex version / git hash | 3.1.1-1 |
| Package Type | RPM |
| Browser type & version | firefox-78.11.0-3.el8_4.x86_64 |
Problem Description
When an organisation is created with a name containing underscores, Cortex will fail listing the users in the organisation when accessing the organisation page.
Steps to Reproduce
- Create a new Cortex organisation with a name containing underscores (ie.
hello_world).

- Click on the organisation to access the organisation page and add a new user. The name does not matter.

- You will not see the user being listed. Additionally, if you refresh the page while using the dev tools, you can see a 404 failed request to the URI
/api/organization/hello/world/user/_search?range=0-50&sort=+name. It can be seen that the underscores in the organisation name have been replaced by forward slashes.


Possible Solutions
I am not familiar enough with Cortex internals to suggest a specific solution, but it might have something to do with the creation of the POST request that lists the users.
I will be happy to provide any more information if required. Cheers and thanks for bringin this project to the world!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with an organisation named hello_world and inspect the failed /api/organization/hello/world/user/_search?range=0-50&sort=+name request. Trace the organisation user-listing request to find where underscores become slashes; done means the user list loads successfully for organisation names containing underscores.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100