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

[Bug] Can't Delete Case Custom Field (contains [ character) After Migration #2043

Closed
nicpenning opened this issue May 27, 2021 · 5 comments
Closed
Assignees
Labels
bug TheHive4 TheHive4 related issues
Milestone

Comments

@nicpenning
Copy link

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu
OS version (client) 18
Virtualized Env. True
Dedicated RAM 8 GB
vCPU 8
TheHive version / git hash 4.1.4, hash of the commit
Package Type DEB
Database Cassandra
Index type Elasticsearch
Attachments storage Local
Browser type & version Chrome

Problem Description

When I try to delete a case custom field I get an error which is likely due to using a bracket "[" character.

image

image

Steps to Reproduce

  1. Create a case custom field with a bracket in it ( "[" or "]")
  2. Migrate to TheHive4 from TheHive3
  3. Try to delete the custom field in TheHive4

Possible Solutions

Change invalid characters on the migration to valid characters so they can be deleted in the new platform.

@nicpenning nicpenning added TheHive4 TheHive4 related issues bug labels May 27, 2021
@nadouani
Copy link
Contributor

@nicpenning updating the custom field names silently during the migration is not an option as it changes the data. We will try to find a way to bypass the special character constraint during the delete.

Recommendation: next time you create a custom field, use a domain-password-reset-phishing style. TheHive GUI will help you for it ;)

Screenshot 2021-05-28 at 06 19 38

@nadouani
Copy link
Contributor

@To-om can you please help investigate the custom field deletion in this case. I was not able to reproduce as TheHive 4 doesn't allow the creation of such a name :)

@nadouani
Copy link
Contributor

@To-om I'll try using the custom field's ID for deletion instead of the name, if possible.

@nadouani nadouani assigned nadouani and unassigned To-om May 28, 2021
@nadouani nadouani added this to the 4.1.5 milestone May 28, 2021
@nadouani
Copy link
Contributor

Well, let me answer myself: I can fix it by just using the custom field id instead of the internal name :)

@nicpenning
Copy link
Author

That was fast, thank you! You would think I would have learned by now that I shouldn't use such characters when creating these things :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

3 participants