Re: [code] Any ideas ?

From: Daniel W. Burke (dwb@ix.netcom.com)
Date: 10/02/96


On Wed, 2 Oct 1996, Mark McArthey wrote:

> Hi all,
> 
> Just wondering about the code snippet presented below.
> I may be wrong, but don't we have a recipe for disaster if
> someone were to put an email address of (for instance) ;rm -rf *
> or something to that effect?
> 
> > sprintf(buf, "mail -s \"%s\" %s <MAILFILE.TXT &", subject, emailaddr);
> > 

You could always

if (strchr(emailaddr, ';') != NULL) {

send_to_char("try again asshole");

}

Brazil

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST