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

Can't untag numeric tag name (str('1')) from an event #1272

Open
aaronkaplan opened this issue Jul 29, 2024 · 2 comments
Open

Can't untag numeric tag name (str('1')) from an event #1272

aaronkaplan opened this issue Jul 29, 2024 · 2 comments
Labels
T: bug Type: bug report: This issue describes unexpected behaviour

Comments

@aaronkaplan
Copy link
Contributor

aaronkaplan commented Jul 29, 2024

If you tag an event with a numeric tag name (let's say the string '1'), then it's impossible to misp.untag(...) it again from an event.

See line:

     response = self._prepare_request('POST', 'tags/removeTagFromObject', data=to_post)

It's probably connected to the way the data is processed in MISP and not really a PyMISP issue. Maybe there is a work-around in PyMISP (?)

And indeed, in MISP the bug is here:
https://github.com/MISP/MISP/blob/c3221af12e664daf501afeef0a658fb11e018f58/app/Controller/TagsController.php#L876

@aaronkaplan aaronkaplan added the T: bug Type: bug report: This issue describes unexpected behaviour label Jul 29, 2024
@Rafiot
Copy link
Member

Rafiot commented Jul 30, 2024

I don't think there is a way to escape the string so the tag is removed instead of being converted to an int. @iglocska @mokaddem @righel if you have an idea?

@aaronkaplan
Copy link
Contributor Author

Yeah, I was afraid of that. The web serivce just gets data and decides if it should be interpreted as int() first or not...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Type: bug report: This issue describes unexpected behaviour
Projects
None yet
Development

No branches or pull requests

2 participants