Regarding the 'h.cfm' issue, go to the bathroom first (your upholstery will
thank me) and THEN sit down and read this.
http://www.carehart.org/blog/client/index.cfm/2013/1/2/serious_security_threat
and the two follow-on blog entries linked at page bottom. This did quite a
job of rocking many worlds and if you are just hearing about it, pray you
aren't vulnerable or infected.
As for email, here's one of mine:
<cfmail
to="#variables.scrubbedEmail#"
from="#server.AdminEmail#"
BCC="#server.developerEmail#"
subject="#variables.scrubbedSubject#"
username="#server.adminUsername#"
password="#server.adminPassword#"
server="#server.emailServer#"
port="#server.emailServerPort#"
type="HTML">
If users are inputting data into your mail headers (i.e. a "your Email"
field and you are taking their input) then you need to scrub that input
before its put into a cfmail parameter. Something like an isEmail()
function for the 'to' if it is an address that is user-submitted. If for
example its the email subject then strip out things like linefeeds and
breaks.
I don't like putting in auth info into the CF administrator (I put dummy
info there, in fact). I prefer to put it in via the CF template, but I
keep the actual account info in a cf template that is actually not on the
web root, and cfincluded into the application via a relative path in
Application.cfm. The point of doing that is the file and its sensitive
contents is a lot harder to find a way to read if its not web-accessible.
I also send mail from CF via a nonstandard port. My mail server is
config'd to listen for incoming mail on that additional port and only
accept from the CF server's IP. IP-specific holes are poked in firewalls
accordingly. This step may not be available with your MS 365 mail server.
If MS 365 has frequency filters that spot mail in quantity being sent from
User X and takes action if it exceeds a certain threshold, then you want to
fire that layer of protection up.
All of this is imperfect but as a package its pretty solid.
--
--m@Robertson--
Janitor, The Robertson Team
mysecretbase.com
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359142