<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>222029</bug_id>
          <alias>CVE-2008-2302</alias>
          <creation_ts>2008-05-14 07:50 0000</creation_ts>
          <short_desc>dev-python/django &lt; 0.96.2 XSS (CVE-2008-2302)</short_desc>
          <delta_ts>2008-05-26 19:01:42 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Security</product>
          <component>Vulnerabilities</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://www.djangoproject.com/weblog/2008/may/14/security/</bug_file_loc>
          <status_whiteboard>~4 [noglsa]</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>nelchael@gentoo.org</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>python@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>nelchael@gentoo.org</who>
            <bug_when>2008-05-14 07:50:17 0000</bug_when>
            <thetext>Description of vulnerability

The Django administration application will, when accessed by a user who is not sufficiently authenticated, display a login form and ask the user to provide the necessary credentials before displaying the requested page. This form will be submitted to the URL the user attempted to access, by supplying the current request path as the value of the form&apos;s &quot;action&quot; attribute.

The value of the request path was not being escaped, creating an opportunity for a cross-site scripting (XSS) attack by leading a user to a URL which contained URL-encoded HTML and/or JavaScript in the request path.
Affected versions

    * Django development trunk
    * Django 0.96
    * Django 0.95
    * Django 0.91

Resolution

The login form has been changed to escape the request path before use as the form&apos;s submission action.

The relevant changesets for affected versions of Django are:

    * Django development trunk: Changeset 7521
    * Django 0.96: Changeset 7527
    * Django 0.95: Changeset 7528
    * Django 0.91: Changeset 7529

The following releases have been issued based on the above changesets:

    * Django 0.96.2
    * Django 0.95.3
    * Django 0.91.2

All users of affected versions of Django are strongly encouraged to apply the relevant patch or upgrade to the relevant patched release as soon as possible.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>py@gentoo.org</who>
            <bug_when>2008-05-14 09:32:37 0000</bug_when>
            <thetext>Python herd, please bump as necessary</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nelchael@gentoo.org</who>
            <bug_when>2008-05-21 07:38:12 0000</bug_when>
            <thetext>Bumping it won&apos;t be as easy as it seems: in 0.96.2 tarball some directories are missing (like extras, examples). I&apos;ve filled a bug upstream about that, but it got closed as WONTFIX: http://code.djangoproject.com/ticket/7273, last comment from that bug:

&gt; Actually, the 0.96.1 tarball was generated by an svn export, while 0.96.2 was 
&gt; generated by using the setup.py script. What this means, really, is that the 
&gt; setup.py script was borked (a known issue), but unfortunately I don&apos;t think we 
&gt; can do much about it; the bugfixes branches are really only for critical 
&gt; security fixes.

So the Django code should come from 0.96.2, and the rest from 0.96.1 or use 0.96.1 tarball with a patch.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nelchael@gentoo.org</who>
            <bug_when>2008-05-26 06:40:07 0000</bug_when>
            <thetext>Created an attachment (id=154317)
django-0.96.1-to-0.96.2.ebuild.patch

This is a patch for 0.96.1 ebuild to create 0.96.2: it has both versions in SRC_URI and uses the missing directories from 0.96.1.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rbu@gentoo.org</who>
            <bug_when>2008-05-26 17:56:42 0000</bug_when>
            <thetext>Krzysiek, feel free to commit the attached patch to CVS. Or do you need additional review?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nelchael@gentoo.org</who>
            <bug_when>2008-05-26 18:17:16 0000</bug_when>
            <thetext>Done:

------------------------------------------------------------------------------
Version bump to fix security bug, see bug #222029.
(Portage version: 2.1.5.2)
------------------------------------------------------------------------------
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rbu@gentoo.org</who>
            <bug_when>2008-05-26 18:19:36 0000</bug_when>
            <thetext>Thanks, closing without stabling and GLSA.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>154317</attachid>
            <date>2008-05-26 06:40 0000</date>
            <desc>django-0.96.1-to-0.96.2.ebuild.patch</desc>
            <filename>django-0.96.1-to-0.96.2.ebuild.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGRqYW5nby0wLjk2LjEuZWJ1aWxkCTIwMDgtMDUtMjYgMDg6MjI6NTEuMDAwMDAwMDAwICsw
MjAwCisrKyBkamFuZ28tMC45Ni4yLmVidWlsZAkyMDA4LTA1LTI2IDA4OjM2OjU0LjAwMDAwMDAw
MCArMDIwMApAQCAtNSwxMiArNSwxNiBAQAogaW5oZXJpdCBiYXNoLWNvbXBsZXRpb24gZGlzdHV0
aWxzIGV1dGlscyB2ZXJzaW9uYXRvcgogCiBSUFY9JChnZXRfdmVyc2lvbl9jb21wb25lbnRfcmFu
Z2UgMS0yKQorRVhUUkFTX1ZFUlNJT049IjAuOTYuMSIKIAogTVlfUD0iRGphbmdvLSR7UFZ9Igog
CiBERVNDUklQVElPTj0iaGlnaC1sZXZlbCBweXRob24gd2ViIGZyYW1ld29yayIKIEhPTUVQQUdF
PSJodHRwOi8vd3d3LmRqYW5nb3Byb2plY3QuY29tLyIKLVNSQ19VUkk9Imh0dHA6Ly9tZWRpYS5k
amFuZ29wcm9qZWN0LmNvbS9yZWxlYXNlcy8ke1JQVn0vJHtNWV9QfS50YXIuZ3oiCitTUkNfVVJJ
PSJodHRwOi8vbWVkaWEuZGphbmdvcHJvamVjdC5jb20vcmVsZWFzZXMvJHtSUFZ9LyR7TVlfUH0u
dGFyLmd6CisJCWh0dHA6Ly9tZWRpYS5kamFuZ29wcm9qZWN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