Subject: | Parsing headers fails under special condition |
Hi!
Parsing the headers fails if there are no spaces and the header value (body) contains colons. In that case the last colon within the line is matched.
E.g. (pseudo code):
line => "X-UI-Loop:V01:q7FVKT02ing=:CI4X73x1iDbky5yDnSnRdw=="
will be parsed into
name => "X-UI-Loop:V01:q7FVKT02ing="
body => "CI4X73x1iDbky5yDnSnRdw=="
Problem lies in IMAPClient.pm, line 2571.
Instead of
s/^(\S+)\:\s*//
I'd rather suggest
s/^(\S+?)\:\s*//
or, more understandable:
s/^([^\s:]+)\:\s*//
Regards,
Jens