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

[CreateNewInidcatorsOnly] escaped_value before calling findIndicators #28803

Merged
merged 27 commits into from Aug 9, 2023

Conversation

michal-dagan
Copy link
Contributor

@michal-dagan michal-dagan commented Aug 6, 2023

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

fixes: link to the issue

Description

Fixed an issue where the indicator_value was not properly escaped before being used in the 'findIndicators' command.

in the previous version we got:
Arguments {
  "debug-mode": true,
  "indicator_values": "(External):Michal \"michal2 test (unsigned)\""
}
=> indicatorValue = "(External):Michal \"michal2 test (unsigned)\""
then we call 	m := fmt.Sprintf("value:\"%s\"", indicatorValue) 
and we got m=> value:"(External):Michal "michal2 test (unsigned)"" => the search failed
instead of m=> value:"(External):Michal \"michal2 test (unsigned)\"" => the search is working

so instead of calling findIndicators with this indicatorValue 
call with indicatorValue = "(External):Michal \\\"michal2 test (unsigned)\\\""

image

@michal-dagan michal-dagan marked this pull request as ready for review August 7, 2023 07:35
@MichaelYochpaz MichaelYochpaz force-pushed the create-indicator-xsup-26838 branch 3 times, most recently from 8697aaf to 4c48f11 Compare August 8, 2023 11:20
@content-bot
Copy link
Collaborator

This PR was automatically updated by a GitHub Action

  • CommonScripts pack version was bumped to 1.12.13.

To stop automatic version bumps, add the ignore-auto-bump-version label to the github PR.

michal-dagan and others added 2 commits August 9, 2023 09:39
…o create-indicator-xsup-26838

# Conflicts:
#	Packs/CommonScripts/Scripts/CreateNewIndicatorsOnly/CreateNewIndicatorsOnly_test.py
@michal-dagan michal-dagan merged commit 232377c into master Aug 9, 2023
14 checks passed
@michal-dagan michal-dagan deleted the create-indicator-xsup-26838 branch August 9, 2023 15:25
xsoar-bot pushed a commit to xsoar-contrib/content that referenced this pull request Oct 5, 2023
…demisto#28803)

* escaped_value

* pre-commit

* updated docker

* added test

* ruff

* revert

* added UT

* pre-commit

* Change `CreateNewIndicatorsOnly_test.py` from `LF` to `CRLF`

* Change `CreateNewIndicatorsOnly_test.py` from `LF` to `CRLF`

* Bump pack from version CommonScripts to 1.12.13.

* updated docker

* updated docker

* crlf

* crlf

* crlf

* Change `CreateNewIndicatorsOnly_test.py` from `LF` to `CRLF`

---------

Co-authored-by: Michael Yochpaz <8832013+MichaelYochpaz@users.noreply.github.com>
Co-authored-by: Content Bot <bot@demisto.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants