Help with split/Formmail.pl

Discussion in 'Perl' started by Kurt, Apr 1, 2004.

  1. Kurt

    Kurt Guest

    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
     
    Kurt, Apr 1, 2004
    #1
    1. Advertising

  2. Kurt wrote:
    > 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.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Apr 1, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lokisapocalypse

    formmail

    lokisapocalypse, Feb 2, 2004, in forum: Perl
    Replies:
    2
    Views:
    881
    Oliver Frick
    Feb 4, 2004
  2. Larry Webb
    Replies:
    10
    Views:
    1,036
    Tina - AffordableHOST, Inc.
    Sep 7, 2004
  3. Rico
    Replies:
    2
    Views:
    143
  4. Margaret Werdermann

    Help! Submitting to FormMail through JavaScript Submit

    Margaret Werdermann, May 21, 2004, in forum: Javascript
    Replies:
    0
    Views:
    255
    Margaret Werdermann
    May 21, 2004
  5. fastjack

    Please help with FormMail

    fastjack, May 3, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    122
    Walter Roberson
    May 3, 2004
Loading...

Share This Page