Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #14076

Re: Encoding Problems

From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.php
Subject Re: Encoding Problems
Date 2014-07-07 01:24 +0000
Organization A noiseless patient Spider
Message-ID <lpcss6$6rc$8@dont-email.me> (permalink)
References (3 earlier) <53B88BF4.4070600@arnowelzel.de> <lpabhg$6rc$5@dont-email.me> <Xe3uv.125629$R01.124727@fx11.iad> <Nt2dnUW2dvtfQSXOnZ2dnUVZ_jKdnZ2d@posted.internetamerica> <rbauv.11634$RT5.8888@fx23.iad>

Show all headers | View raw


On Sun, 06 Jul 2014 07:14:06 -0400, Richard Damon wrote:

> On 7/6/14, 1:21 AM, Gordon Burditt wrote:
>>> multipart/form-date would be a value for Content-Type, not a value for
>>> Content-Transfer-Encoding.

>>> The defined vauls (By RFC 2045) of Content-Transfer-Encoding are:
>>> quoted-printable base64 binary 8bit 7bit

>> Never forget that viruses and malware aren't required to obey the
>> rules, and you could very well end up with Content-Type: spam/virus and
>> Content-Transfer-Encoding: rot13 .

> And if you don't properly "decode" that payload there is a problem?

No, but doing something sensible and clean in the face of unexpected data 
values is better than just bombing out.

My original points are and remain that (a) the values you get for the 
content-transfer-encoding might not be in your list, and (b) that the 
actual content-transfer-encoding might not match the declared content-
transfer-encoding.

This combination of factors means that having a default that assumes "if 
it didn't match anything else it must be x" is a bad idea. It also means 
that it's a good idea to expect and try and cleanly detect any content 
decoding errors, on the assumption that at some point malformed content 
will arrive and you want to handle it in a manner that, at the very 
least, doesn't create a vulnerability.

-- 
Denis McMahon, denismfmcmahon@gmail.com

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-02 15:53 +0000
  Re: Encoding Problems Jerry Stuckle <jstucklex@attglobal.net> - 2014-07-02 15:15 -0400
    Re: Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-03 10:18 +0000
  Re: Encoding Problems Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-02 21:49 +0200
    Re: Encoding Problems bill <william@TechServSys.com> - 2014-07-03 08:09 -0400
  Re: Encoding Problems Christoph Michael Becker <cmbecker69@arcor.de> - 2014-07-02 22:25 +0200
    Re: Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-03 10:16 +0000
  Re: Encoding Problems bill <william@TechServSys.com> - 2014-07-03 08:08 -0400
    Re: Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-03 13:17 +0000
  Re: Encoding Problems Arno Welzel <usenet@arnowelzel.de> - 2014-07-05 03:16 +0200
    Re: Encoding Problems Arno Welzel <usenet@arnowelzel.de> - 2014-07-05 03:19 +0200
      Re: Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-10 13:57 +0000
        Re: Encoding Problems Arno Welzel <usenet@arnowelzel.de> - 2014-07-11 18:47 +0200
          Re: Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-14 08:35 +0000
          Re: Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-18 09:06 +0000
            Re: Encoding Problems Tim Streater <timstreater@greenbee.net> - 2014-07-18 10:29 +0100
              Re: Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-18 09:38 +0000
                Re: Encoding Problems Tim Streater <timstreater@greenbee.net> - 2014-07-18 11:05 +0100
                Re: Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-18 11:42 +0000
                Re: Encoding Problems Tim Streater <timstreater@greenbee.net> - 2014-07-18 14:32 +0100
            Re: Encoding Problems Arno Welzel <usenet@arnowelzel.de> - 2014-07-19 09:36 +0200
              Re: Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-29 13:58 +0000
    Re: Encoding Problems Christoph Michael Becker <cmbecker69@arcor.de> - 2014-07-05 03:28 +0200
      Re: Encoding Problems Arno Welzel <usenet@arnowelzel.de> - 2014-07-06 01:36 +0200
        Re: Encoding Problems Denis McMahon <denismfmcmahon@gmail.com> - 2014-07-06 02:16 +0000
          Re: Encoding Problems Richard Damon <Richard@Damon-Family.org> - 2014-07-05 23:19 -0400
            Re: Encoding Problems gordonb.defz8@burditt.org (Gordon Burditt) - 2014-07-06 00:21 -0500
              Re: Encoding Problems Richard Damon <Richard@Damon-Family.org> - 2014-07-06 07:14 -0400
                Re: Encoding Problems Denis McMahon <denismfmcmahon@gmail.com> - 2014-07-07 01:24 +0000
        Re: Encoding Problems Christoph Michael Becker <cmbecker69@arcor.de> - 2014-07-06 15:30 +0200
          Re: Encoding Problems Arno Welzel <usenet@arnowelzel.de> - 2014-07-06 21:46 +0200
            Re: Encoding Problems Richard Damon <Richard@Damon-Family.org> - 2014-07-06 16:21 -0400
              Re: Encoding Problems Arno Welzel <usenet@arnowelzel.de> - 2014-07-07 03:49 +0200
    Re: Encoding Problems stef_204 <notvalid@nomail.nul> - 2014-07-10 13:18 +0000

csiph-web