Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Ticket #499 (defect)

Opened 3 years ago

Last modified 3 years ago

Request validation in XmlRpcFilter

Status: closed (fixed)

Reported by: _wdx@163.com Assigned to: rdelon
Priority: normal Milestone: 2.2-rc1
Component: CherryPy code Keywords: xmlrpcfilter,validation
Cc:

In xmlrpcfilter.py, there's such code to validate a XML-RPC request:

    def testValidityOfRequest(self):
        # test if the content-length was sent
        length = cherrypy.request.headers.get('Content-Length') or 0
        ct = cherrypy.request.headers.get('Content-Type') or 'text/xml'
        return int(length) > 0 and ct.lower() in ['text/xml']

The content type of a valid request might be different than 'text/xml'. for example, it can be 'text/xml;charset=UTF-8'. In such situation, the last statement:

    ct.lower() in ['text/xml']

will cause problem.

Change History

03/29/06 04:54:43: Modified by rdelon

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [1027]

Hosted by WebFaction

Log in as guest/cpguest to create tickets