-
Notifications
You must be signed in to change notification settings - Fork 786
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
Fix UI bug in ATT&CK Report #949
Fix UI bug in ATT&CK Report #949
Conversation
67d8a3b
to
21781d5
Compare
Codecov Report
@@ Coverage Diff @@
## develop #949 +/- ##
========================================
Coverage 19.07% 19.07%
========================================
Files 338 338
Lines 11482 11482
========================================
Hits 2190 2190
Misses 9292 9292 Continue to review full report at Codecov.
|
@@ -159,7 +159,9 @@ class AttackReport extends React.Component { | |||
} | |||
// modify techniques' messages | |||
for (const tech_id in techniques){ | |||
techniques[tech_id]['message'] = <div dangerouslySetInnerHTML={{__html: marked(techniques[tech_id]['message'])}} />; | |||
if (typeof techniques[tech_id]['message'] === 'string') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we understand why the messages are objects instead of strings? What is the root cause of this issue? Are we just side-stepping it by checking the type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
marked()
modifies them in place. We need to change this behaviour(maybe there's a param for this? maybe we pass a copy of the string instead?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VakarisZ Does marked()
modify in place? All of the usage I can find implies that it returns a value, and javascript strings are immutable. https://marked.js.org/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I think you mistyped and meant that modifyTechniqueData()
modifies in-place. I think we're on the same page.
monkey/monkey_island/cc/ui/src/components/report-components/AttackReport.js
Outdated
Show resolved
Hide resolved
1c50b94
to
32b116c
Compare
Fixes #948
attack-report-bug-fix.mp4