Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - E-mail Notify problem with Comcast Addys
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

E-mail Notify problem with Comcast Addys

 Post Reply Post Reply
Author
niugiovanni View Drop Down
Groupie
Groupie


Joined: 20 July 2004
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote niugiovanni Quote  Post ReplyReply Direct Link To This Post Topic: E-mail Notify problem with Comcast Addys
    Posted: 09 August 2005 at 7:08pm
I'm having some problems with my WebWiz forums not being able to mail out to Comcast Addresses.  I've been through the code and can't seem to find the issue.
 
An e-mail that is entered by the user as this: 
 
 
will actually be mailed by the software as this:
 
someone@comcast.net
 
It seems as the the "S" is being replaced by an "s"
 
Anyone have any ideas or solutions?
 
Thanks
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2005 at 10:10pm
The forum encodes certain character strings that users enter to prevent sql injection attacks. Might be a good idea to include functions/functions_filters.asp in functions/send_mail.asp and run the email address through the decodeString function before putting it in the "To" field of whatever email component you're using.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2005 at 12:00pm
"cast" gets converted to "cast" to prevent the SQL function "CAST" from being injected.  I found that the sendmail() function in pm_post_message.asp uses the decodeString() function to decode the username and email addresses.  However, in email_messenger.asp, all the variables are sent to the sendmail() function raw.
 
This is definitely a bug in 7.92 that seems to also exist at least as far back as 7.01.  It seems to me that the best solution is to use the decodeString() function inside the sendmail() function itself.  This more safely assumes the input is not sanitized.
 
In functions_send_mail.asp (in the forum/functions folder and the forum/admin/functions folder), immediately below the line "Function SendMail(...), add the following:
 
strRecipientEmailAddress = decodeString(strRecipientEmailAddress)
strRecipientName = decodeString(strRecipientName)
strFromEmailName = decodeString(strFromEmailName)
strFromEmailAddress = decodeString(strFromEmailAddress)
 
That should ensure that all the incoming data is restored before actually attempting to send mail.
 
 
Back to Top
niugiovanni View Drop Down
Groupie
Groupie


Joined: 20 July 2004
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote niugiovanni Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2005 at 3:30pm
Awesome Suggestion!  Thanks so much.  I figured it had to do with security but just couldn't find the reference.  Thanks again!
 
Gio
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.