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? Stirring the pot, Mark McArthey ` _ , ' mcarthey@execpc.com - (o)o) - -----------------------ooO'(_)--Ooo- > On Wed, 2 Oct 1996, Rasmus 'Con' Ronlev wrote: > > Write message in a file <MAILFILE.TXT> > then: > sprintf(buf, "mail -s \"%s\" %s <MAILFILE.TXT &", subject, emailaddr); > system(buf); > > :) Should handle that problem :) The & make sure it become a background > proccess, and that way continue with the MUD at once. And then its all up > for the server to handle the two things at the same time :) > But wont affect the MUD as much if you did a system() call without & > *shiver* > +-----------------------------------------------------------+ | 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