How To Remove Bugged Issue

52 views
Skip to first unread message

wyoung

unread,
May 22, 2014, 1:11:10 AM5/22/14
to dradi...@googlegroups.com
I was editing an issue, and when I saved the changes I had made I got the Dradis something has gone wrong page.  I went back to try and make the changes to the issue again, but everytime I either click the issue to edit it, or try to view a host that has that issue attached to it I'm thrown back to the error page.  I checked all three relevant log files and no output or errors are being generated for this.  My best guess is that the issue contains some characters that Dradis didn't like, but I'm unable to edit or delete it to fix it.  How can I manually remove this issue from the project?

Thanks!

wyoung

unread,
May 22, 2014, 6:16:09 AM5/22/14
to dradi...@googlegroups.com
Just an update, I think it happened because I forgot to close one of the "#[  ]#" tags, as I just accidentally saved an issue without closing one a few minutes ago, got the error message, then hit the back button and corrected.  Regardless, the previous issue I was talking about is still inaccessible.

Robin Wood

unread,
May 22, 2014, 6:20:16 AM5/22/14
to dradis-pro
If that is what you think it is then a very quick solution while
waiting for Daniel to come up with a valid one is to go into the
database and blank out that note. The database connection values are
in:

/opt/dradispro/dradispro/current/config/database.yml

Have a look through the notes table, it will be one of the last if you
just created it. Update the text field to "".

I'd suggest snapshotting the VM before you do this just in case as you
could wipe out your whole installation if you mess this up.

Robin
> --
> You received this message because you are subscribed to the Google Groups
> "Dradis Pro users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dradis-pro+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Daniel Martin

unread,
May 22, 2014, 7:18:38 AM5/22/14
to dradi...@googlegroups.com
Hi Robin, Will,

There is no need to go down to the DB layer, you can use the console for this type of thing:

$ cd /opt/dradispro/dradispro/current/
$ RAILS_ENV=production bundle exec rails console
irb> Issue.find(<id>).text

Will, please send me the text before deleting the issue (on or off-list) so I can look into it and patch the code if necessary.

You can get the Issue id from the browser (hovering on a link).

If tho sis a Note instead of an issue, just Note.find().

Then:

irb> Issue.find(<id>).destroy



HTH,
Daniel

Director
Security Roots Ltd.
Registered company no 07389856 in England and Wales

Robin Wood

unread,
May 22, 2014, 7:25:18 AM5/22/14
to dradis-pro
How would you then set the text and save it?
> --
> Director
> Security Roots Ltd.
> Registered company no 07389856 in England and Wales
>

Daniel Martin

unread,
May 22, 2014, 7:29:36 AM5/22/14
to dradi...@googlegroups.com
Hi Robin,


> How would you then set the text and save it?

irb> i = Issue.find(<id>)
irb> i.text = “foo”
irb> i.save


HTH,
Daniel


Morris's three golden rules of computer security:
do not own a computer;
do not power it on;
and do not use one

Robin Wood

unread,
May 22, 2014, 7:30:01 AM5/22/14
to dradis-pro
Thought that would be it but just checking.

On 22 May 2014 12:29, Daniel Martin <dan...@securityroots.com> wrote:
> Hi Robin,
>
>
>> How would you then set the text and save it?
>
> irb> i = Issue.find(<id>)
> irb> i.text = "foo"
> irb> i.save
>
>
> HTH,
> Daniel
>
> --
> Morris's three golden rules of computer security:
> do not own a computer;
> do not power it on;
> and do not use one
>

wyoung

unread,
May 23, 2014, 11:48:07 PM5/23/14
to dradi...@googlegroups.com
Thank you both.  Before I destroy the issue, can you tell me how I can display the issue text so I can send it to you?  irb> Issue.find(<id>).text isn't displaying anything (not sure if its supposed to) so I don't want to delete the issue till I can get you the data from it.

Robin Wood

unread,
May 25, 2014, 6:11:00 PM5/25/14
to dradis-pro
You can print it like this

irb> i = Issue.find(<id>)
irb> puts i.text

Robin
Reply all
Reply to author
Forward
0 new messages