Help with split/Formmail.pl

K

Kurt

Hello,

I have software that allows direct submission of tech support requests.
The software connect directly to a formmail script. The problem is that
if the user types a '=' or a '&' anywhere in the message, the resulting
email is truncated at that spot.

It looks like the sub parse_form routine, which splits on '&', is
responsible. Then again, submitting the same text from a web form (to
the same formmail.pl) does not truncate the text.

I submit the text in the form:

&recipient=the_recipient
&subject=the_subject
&=the_actual_message

Again, the_actual_message is clipped at first occurence of a '&' or
'='.
Any ideas how to fix this?

Kurt
 
G

Gunnar Hjalmarsson

Kurt said:
I have software that allows direct submission of tech support
requests. The software connect directly to a formmail script. The
problem is that if the user types a '=' or a '&' anywhere in the
message, the resulting email is truncated at that spot.

It looks like the sub parse_form routine, which splits on '&', is
responsible.

Whichever formmail script it is you are using, it reasonably
presupposes that the incoming data is URI escaped, while the data you
are transferring from that other software is apparently not URI escaped.
Any ideas how to fix this?

Escape the data before passing it to formmail. See the URI::Escape module.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top