MISP / MISP/PyMISP

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

Open
#1,272 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T: bug
Dominant language
Python
Stars
491
Forks
290
Avg merge
2d 8h
Merged PRs (30d)
3

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PyMISP untag path that calls _prepare_request('POST', 'tags/removeTagFromObject', data=to_post) and compare it with MISP's app/Controller/TagsController.php at line 876. Determine whether PyMISP can work around the numeric tag parsing; done means an event tagged with the string '1' can be removed successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.