GhostManager / Ghostwriter

The SpecterOps project management and reporting engine

Home Page:https://ghostwriter.wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't delete Notes from findings in the Ghostwritter UI (version v4.0.5)

marcioalm opened this issue · comments

Describe the bug
In the version v4.0.5, released 12 January 2024 is not possible to delete notes from findings using ghostwritter UI.

To Reproduce
Steps to reproduce the behavior:

  1. Create a finding
  2. Create a note in the finding and save
  3. Go back in the finding, click in notes and click in the delete button. Observe that the action will not work

The following is the debug error message received from WebConsole Firefox:

This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://firefox-source-docs.mozilla.org/performance/scroll-linked_effects.html for further details and to join the discussion on related tools and features! [1216](https://xxx/reporting/reports/findings/update/1216)
Uncaught ReferenceError: escapeHtml is not defined
    <anonymous> https://xxx/reporting/reports/findings/update/1216:1464
    jQuery 7
    show https://xxx/static/js/bootstrap.min.js:6
    toggle https://xxx/static/js/bootstrap.min.js:6
    Ct https://xxx/static/js/bootstrap.min.js:6
    jQuery 2
    _jQueryInterface https://xxx/static/js/bootstrap.min.js:6
    <anonymous> https://xxx/static/js/bootstrap.min.js:6
    jQuery 2

Expected Behavior
Once the click in delete its expected the note to be deleted.

Hey @marcioalm, I'm not able to reproduce this issue with v4.0.5. However, some JavaScript handles the note confirmation dialog and deletion. If there is a console error like this when the page loads or when you try to delete a note, that JavaScript won't be working. This error mentions escapeHtml. This is a function defined in js/project.js and a parameter/function in the Toastr library we use. The error is probably referencing the former. Your browser may have an older cached version of project.js that doesn't have escapeHtml. Try holding SHIFT while clicking refresh to force the browser to re-fetch all the CSS and JS files.

Geez... feelz so bad now man... I thought that I had refreshed the browser cache... anyway, really sorry mate. It happened after I updated ghostwritter, so it makes completely sense now.

Closing the issue and sorry for wasting ur time.

Cheers.

No problem at all @marcioalm! I'm happy to help. I love an easy fix 😄