Page 2 of 5

Re: Respond URL - Bad Ticket

Posted: Wed Sep 17, 2014 8:20 am
by BanditBBS
Ok, getting the error quite frequently apparently. If you'd like to investigate lets do it :)

This is our service desk that creates a ticket and then acknowledges alerts, so kind of a pain in the butt with rr not working for them.

Re: Respond URL - Bad Ticket

Posted: Wed Sep 17, 2014 10:31 am
by sreinhardt
Do we know if this is happening with all users attempting to use rapid response links? Also just to get it out of the way, XI version on that system? Let's also run the following:

Code: Select all

grep 'secure_response_url' /usr/local/nagiosxi/html/config.inc.php

Re: Respond URL - Bad Ticket

Posted: Wed Sep 17, 2014 10:36 am
by BanditBBS
sreinhardt wrote:Do we know if this is happening with all users attempting to use rapid response links? Also just to get it out of the way, XI version on that system? Let's also run the following:

Code: Select all

grep 'secure_response_url' /usr/local/nagiosxi/html/config.inc.php
Sorry, this is on teh 2014 1.4 Server. This is not happening for all users as I just checked with some of the notifications I have received(not for same host/services though).

Secure response URL is remarked out, I did not enable that here:

Code: Select all

// $cfg['secure_response_url']=1;

Re: Respond URL - Bad Ticket

Posted: Wed Sep 17, 2014 2:55 pm
by tmcdonald
This is gonna be gross, but bear with me:

Code: Select all

echo "select backend_ticket from xi_users where user_id=51" | psql -t nagiosxi nagiosxi | tr -d ' ' | tr -d "\n" | md5sum

Re: Respond URL - Bad Ticket

Posted: Wed Sep 17, 2014 2:56 pm
by BanditBBS
tmcdonald wrote:This is gonna be gross, but bear with me:

Code: Select all

echo "select backend_ticket from xi_users where user_id=51" | psql -t nagiosxi nagiosxi | tr -d ' ' | tr -d "\n" | md5sum

Code: Select all

[root@iss-chi-nag05 shapes]# echo "select backend_ticket from xi_users where user_id=51" | psql -t nagiosxi nagiosxi | tr -d ' ' | tr -d "\n" | md5sum
9c12089a0ee5c6da4f7575d700e3c185  -

Re: Respond URL - Bad Ticket

Posted: Wed Sep 17, 2014 3:03 pm
by tmcdonald
Edit /usr/local/nagiosxi/html/rr.php around line 68 and add in the following:

Code: Select all

    if ($user_ticket_md5 != $ticket_md5) {
        echo "Bad ticket";
        echo "$user_ticket_md5 should be equal to $ticket_md5"; // Add me
        exit();
    }

then visit the RR link again (with the double hyphen reduced to just one, or course). I wanna see what the PHP thinks those backend MD5s are.

Re: Respond URL - Bad Ticket

Posted: Wed Sep 17, 2014 3:43 pm
by BanditBBS
If I leave in the double - then I get the ticket should be "1"

If I knock it down to 1 - then I get this page:
Capture.PNG

Re: Respond URL - Bad Ticket

Posted: Thu Sep 18, 2014 2:47 pm
by abrist
Hmmm, we may need to do a remote to really hunt this down . . . .

Re: Respond URL - Bad Ticket

Posted: Thu Sep 18, 2014 3:49 pm
by BanditBBS
You know me, always willing....

Re: Respond URL - Bad Ticket

Posted: Thu Sep 18, 2014 3:51 pm
by abrist
You available now?