Menu

#2870 processParameters cutting of chars when charset and language have different length

Development CVS
open
nobody
None
5
2024-01-19
2024-01-19
No

While looking for RFC 2231 / 2184 implementations i found yours.
https://sourceforge.net/p/squirrelmail/code/HEAD/tree/trunk/squirrelmail/class/mime/Rfc822Header.class.php#l746
It seems to have a small bug as that line should be $value = substr($value,strlen($language)+1);

As the charset and language fields can have (and most likely do) have different length.

I also submitted the change to some github fork (https://github.com/RealityRipple/squirrelmail/pull/13)

Instead of relying on the substr & strlen you can also use $value = explode("'", $aResults[$key], 3); (not 1:1 replacement) for a bit better overview what is happening there.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB