yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #01733
[Bug 1101043] Re: xml_body returns backtrace on XMLSyntaxError
** Changed in: keystone
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1101043
Title:
xml_body returns backtrace on XMLSyntaxError
Status in OpenStack Identity (Keystone):
Fix Released
Bug description:
If password contain special character, for example '&', it will raise
an exception when request authentication with xml body while
authentication successfull with json body.
$curl -X POST -H Content-Type:application/xml
localhost:5000/v2.0/tokens -d '<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><auth
xmlns="http://docs.openstack.org/identity/api/v2.0"><passwordCredentials
username="test" password="test321&sdf"/></auth>'
The lxml lib raise an exception.
File "/opt/stack/keystone/keystone/common/serializer.py", line 63, in __call__
dom = etree.fromstring(xml_str.strip())
File "lxml.etree.pyx", line 2754, in lxml.etree.fromstring (src/lxml/lxml.etree.c:54631)
File "parser.pxi", line 1578, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:82748)
File "parser.pxi", line 1457, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:81546)
File "parser.pxi", line 965, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:78216)
File "parser.pxi", line 569, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:74472)
File "parser.pxi", line 650, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:75363)
File "parser.pxi", line 590, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:74696)
XMLSyntaxError: EntityRef: expecting ';', line 1, column 115
$curl -X POST -H Content-Type:application/json localhost:5000/v2.0/tokens -d '{"auth": {"passwordCredentials": {"username": "test", "password": "test321&sdf"}}}'
Authentication successfull.
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1101043/+subscriptions