Re: [htdig] Buglet in htnotify?


Subject: Re: [htdig] Buglet in htnotify?
From: Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Date: Mon Nov 15 1999 - 10:29:13 PST


According to Geoff Hutchison:
> At 1:22 PM +1300 11/15/99, Jason Haar wrote:
> >From: "ht://Dig Notification Service" <xxx@yyy>
> >
> >This occurs in another spot too - where sendmail is called with the "-F"
> >option to set fullname. Calling it as "-F '"ht://Dig Notification Service"'"
> >would fix that too I suppose...
>
> The first of this is a good point. As for the second, I'm pretty sure
> that's how sendmail is called:
>
> String command = SENDMAIL;
> command << " -t -F \"ht://Dig Notification Service\" -f \"";
> command << config["htnotify_sender"] << '"';
>
> This should generate:
>
> sendmail -t -F "ht://Dig Notification Service" -f "user@domain.org"

I think Jason is suggesting doubly quoting the -F option, so that sendmail
actually sees one set of quotes inside the argument...

  sendmail -t -F '"ht://Dig Notification Service"' -f "user@domain.org"

This patch to 3.1.3 covers both buglets:

--- htnotify/htnotify.cc.orig Wed Sep 22 11:18:44 1999
+++ htnotify/htnotify.cc Mon Nov 15 12:23:39 1999
@@ -217,7 +217,7 @@ void htnotify(DocumentRef &ref)
 void send_notification(char *date, char *email, char *url, char *subject)
 {
     String command = SENDMAIL;
- command << " -t -F \"ht://Dig Notification Service\" -f \"";
+ command << " -t -F '\"ht://Dig Notification Service\"' -f \"";
     command << config["htnotify_sender"] << '"';
 
     String em = email;
@@ -248,7 +248,7 @@ void send_notification(char *date, char
       if (!subject || !*subject)
         subject = "page expired";
       String out;
- out << "From: ht://Dig Notification Service <"
+ out << "From: \"ht://Dig Notification Service\" <"
           << config["htnotify_sender"] << ">\n";
       out << "Subject: WWW notification: " << subject << '\n';
       out << "To: " << to.get() << '\n';

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------ To unsubscribe from the htdig mailing list, send a message to htdig@htdig.org containing the single word unsubscribe in the SUBJECT of the message.



This archive was generated by hypermail 2b25 : Mon Nov 15 1999 - 10:40:25 PST