Problem with links in alert emails?
Hi,
Thanks for all your work on Hobbit. It's a great product.
I recently installed 4.2-alfa-20060423 on a new box to replace our current monitoring box (running 4.1.2).
Once I switched over, I noticed that if I clicked on a link in an email, I got the message "Invalid Request". I then went and checked what the proper URL was meant to be, and noticed the difference:
Real/Working Link: http://linux/hobbit-cgi/bb-hostsvc.sh?HOST=printsrv.domain.local&SERVICE =msgs
Link in Email: http://linux/hobbit-cgi/bb-hostsvc.sh?HOST=printsrv.domain.local&SER VICE=msgs
Is there any way to fix this quickly myself?, or do I have to wait until the next release?
Thanks in advance,
Daniel Streefkerk
DANIEL STREEFKERK IT Systems Administrator Ferrier Hodgson Level 17, 2 Market St Sydney, NSW 2000
Email: Daniel.Streefkerk at syd.fh.com.au
<mailto:Daniel.Streefkerk at syd.fh.com.au>
Phone: (02) 9286 9999
Fax: (02) 9286 9888
Website: www.fh.com.au <http://www.fh.com.au/>
This email (including any attachments) is intended only to be read or used by the addressee. It contains information that may be confidential and legally privileged. If you are not the addressee, or you have received this email by mistake, you must not disclose, copy or distribute it or use the information contained in it (or any attachments) in any way.
If you have received this message in error please notify Ferrier Hodgson by return email and then delete this message and any copies of it. Please also contact us if you have any doubts about the authenticity of this email.
If you have received this email as a result of subscribing to a particular distribution list and no longer wish to be included in this or any other list(s), please send an email to webmaster at syd.fh.com.au with 'Unsubscribe' in the subject field and details of the list(s) from which you wish to unsubscribe.
This email (including any attachments) may contain computer viruses or other defects. It is your responsibility to check this email and its attachments for viruses and defects before opening or forwarding them, and Ferrier Hodgson is not liable for any loss or damage that may be caused by any such viruses or defects.
On Thu, May 25, 2006 at 11:16:55AM +1000, Daniel Streefkerk wrote:
Once I switched over, I noticed that if I clicked on a link in an email, I got the message "Invalid Request". I then went and checked what the proper URL was meant to be, and noticed the difference:
Real/Working Link: http://linux/hobbit-cgi/bb-hostsvc.sh?HOST=printsrv.domain.local&SERVICE=msg...
Link in Email: http://linux/hobbit-cgi/bb-hostsvc.sh?HOST=printsrv.domain.local&SERVICE=msgs
Is there any way to fix this quickly myself?, or do I have to wait until the next release?
The quick-and-dirty fix is to change the formatting string used in lib/cgiurls. Near the beginning of the file you'll find this line:
sprintf(url, "%s/bb-hostsvc.sh?HOST=%s&SERVICE=%s", cgibinurl, hostname, service);
Remove the "amp;" thing so it becomes
sprintf(url, "%s/bb-hostsvc.sh?HOST=%s&SERVICE=%s", cgibinurl, hostname, service);
This is not the correct fix, since it will generate links inside the webpages that are strictly not HTML 4 compliant. But all browsers that I know will accept these. The correct fix involves changing a bit more code.
Regards, Henrik
participants (2)
-
Daniel.Streefkerk@syd.fh.com.au
-
henrik@hswn.dk