Help with split/Formmail.pl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kurt

    Help with split/Formmail.pl

    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_su bject
    &=the_actual_me ssage

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

    Kurt



  • Gunnar Hjalmarsson

    #2
    Re: Help with split/Formmail.pl

    Kurt wrote:[color=blue]
    > 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.[/color]

    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.
    [color=blue]
    > Any ideas how to fix this?[/color]

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

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl

    Comment

    Working...