Closed Gavitron closed 2 years ago
Thanks for this @Gavitron - I have renamed variable threatId in 138+ so it does not cause confusion. Also I have created a pull request to add in the uuid threatId
if none exists on editing the threat
Excellent bug report, thanks again!
Hi, this might be addressed by the rewrite for 2.0, but I thought I'd ask just in case.
I noticed in the JSON output of TD, that there was a
threatID
property, but only on some of thethreats[]
, and not all of them. When I looked into why, I think it's because I created some threats in v1.40 but later upgraded to v1.55?The code here seems to add the UUID to new threats: https://github.com/OWASP/threat-dragon/blob/ce18ce57898e232c37760a4414c6927e1f9637cf/td.desktop/core/diagrams/elementpropdirectives.js#L110
but maybe when editing an existing threat one needs to be generated, if none exists? https://github.com/OWASP/threat-dragon/blob/ce18ce57898e232c37760a4414c6927e1f9637cf/td.desktop/core/diagrams/elementpropdirectives.js#L127
(also, I think the use of
threatId
on line 138+ is a red herring, as that appears to be related to theid
field of the parent cell, and not thethreatId
parameter of the individualthreats[]
. Am I wrong?)