I don't quite understand your question. Are you talking about null bytes that are being submitted in a GET or POST request to your CGI app? Is your app running into some particular problem involving null bytes?

I don't know for sure, but it wouldn't surprise me if there were some situations where actual null bytes are to be expected as part of the data going from client to app or from app to client; assuming such cases exist, it would seem to be a bad idea to filter them out, because they're probably part of some compressed or other binary stream, and such a stream would become unusable if certain bytes were filtered out.

Apart from such cases (if indeed there are any), I'd expect null bytes to be "encoded" in some way for transmission between server and client (e.g. as a three-character string "%00"), and again, I could imagine (but haven't seen) cases where this might be appropriate or necessary for some purpose, so again it's likely to be a mistake to filter them out.

Please explain what you're doing that involves null bytes in your CGI usage, and say more about the nature of the problem you're trying to solve.


In reply to Re: CGI.pm Filter out recurring NULL Bytes by graff
in thread CGI.pm Filter out recurring NULL Bytes by $h4X4_|=73}{

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.