> hi this is ravin. i m a last year IT student and i am doing my project
> at a govt. organization. i have to do one thing in my project that:
[quoted text clipped - 7 lines]
>
> please send releated help as early as possible.
> How about a simple example? I googled this up in about two minutes
> using keywords {jsp mailto form} and it was the fourth hit.
[quoted text clipped - 12 lines]
> >
> > please send releated help as early as possible.
Well that example doesnt really show much, except the html for sending
the email, but I noticed a single thing about that example that you
should _never_ _ever_ do....the "to" email is a hidden field in the
form, and if your code just accepts that email "as-is", you open
yourself to all kinds of problems. Instead if your form as different
possible mail-to options, have the form submit a value like "1" and
then select the appropriate email from an array or something. Just
thought I'd share this thought.
/Steen
Alex Hunsley - 26 May 2006 00:00 GMT
>> How about a simple example? I googled this up in about two minutes
>> using keywords {jsp mailto form} and it was the fourth hit.
[quoted text clipped - 22 lines]
>
> /Steen
Another classic web email form of attack:
If the mail form code just blindly puts the body as typed in by the user
as the body of the email, it can be vulnerable: a naughty person could
something like the following in the body field:
Bcc: someaddress@somewhere
.. and in some circumstances, because this looks like a header, it can
be interpreted as a header by the mail agent, if it's the first thing in
the body.
Oliver Wong - 26 May 2006 15:34 GMT
> Another classic web email form of attack:
> If the mail form code just blindly puts the body as typed in by the user
[quoted text clipped - 6 lines]
> be interpreted as a header by the mail agent, if it's the first thing in
> the body.
Interesting. I thought you needed a blank line between the header and
the body of an e-mail (assuming SMTP anyway), otherwise the SMTP server
would reject the e-mail as being invalid. So if your code were indeed
vulnerable to this attack, I'd imagine you'd find out very soon (the first
e-mail which doesn't start with a blank line and can't be interpreted as a
header would fail).
- Oliver