<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>321160</bug_id>
          
          <creation_ts>2013-06-14 21:46:47 +0000</creation_ts>
          <short_desc>WebKit renders an empty view when fed text/plain which contains 0x00 characters</short_desc>
          <delta_ts>2013-06-16 09:42:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>trojita</product>
          <component>Desktop GUI</component>
          <version>git</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jan Kundrát">jkt</reporter>
          <assigned_to name="Trojita default assignee">trojita-bugs</assigned_to>
          
          
          <cf_commitlink>http://commits.kde.org/trojita/14efb142be63e7a25542ea09ad571ca320eaec16</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1376679</commentid>
    <comment_count>0</comment_count>
      <attachid>80517</attachid>
    <who name="Jan Kundrát">jkt</who>
    <bug_when>2013-06-14 21:46:47 +0000</bug_when>
    <thetext>Created attachment 80517
The &quot;text/plain&quot; attachment which contains zero bytes msg_2282_1

The SimplePartWidget renders an empty page instead of the actual content when fed with the test data (a real-world example from the kdepim ML). The only &quot;weird thing&quot; I recognize in there are the null bytes within the contents, but I have no proof that this is what is causing troubles here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1377021</commentid>
    <comment_count>1</comment_count>
    <who name="Jan Kundrát">jkt</who>
    <bug_when>2013-06-16 09:42:25 +0000</bug_when>
    <thetext>Git commit 653e02203abe1211780633e962835827219a52dc by Jan Kundrát.
Committed on 15/06/2013 at 00:15.
Pushed by jkt into branch &apos;master&apos;.

When decoding from unknown encoding and assuming UTF-8, be sure to not stop at first NULL byte

This does *not* fix #321160 (this code is not even triggered in this situation),
but it&apos;s a sane thing to do anyway. I guess that the code shall be audited for
other instances where we might silently truncate the data here; it&apos;s caused by
an implicit conversion from QByteArray to uchar*.

M  +1    -1    src/Imap/Encoders.cpp

http://commits.kde.org/trojita/653e02203abe1211780633e962835827219a52dc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1377022</commentid>
    <comment_count>2</comment_count>
    <who name="Jan Kundrát">jkt</who>
    <bug_when>2013-06-16 09:42:27 +0000</bug_when>
    <thetext>Git commit 14efb142be63e7a25542ea09ad571ca320eaec16 by Jan Kundrát.
Committed on 15/06/2013 at 00:23.
Pushed by jkt into branch &apos;master&apos;.

WebKit: convert plaintext input with NULL bytes without silent truncation

This does *not* fix HTML input containing null bytes. I don&apos;t know if this
problem is relevant for HTML e-mails as well.
REVIEW: 111030

M  +10   -1    src/Gui/SimplePartWidget.cpp

http://commits.kde.org/trojita/14efb142be63e7a25542ea09ad571ca320eaec16</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>80517</attachid>
            <date>2013-06-14 21:46:47 +0000</date>
            <delta_ts>2013-06-14 21:46:47 +0000</delta_ts>
            <desc>The &quot;text/plain&quot; attachment which contains zero bytes msg_2282_1</desc>
            <filename>msg_2282_1</filename>
            <type>text/plain</type>
            <size>1052</size>
            <attacher name="Jan Kundrát">jkt</attacher>
            
              <data encoding="base64">QW0gRnJlaXRhZywgMTQuIEp1bmkgMjAxMywgMTI6MTY6MzEgc2NocmllYiB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