UnicodeEncodeError that results in an HTTP 500 on certain unicode characters in payload_content_type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Barbican |
Fix Released
|
Medium
|
Everardo Padilla Saca |
Bug Description
Returns a 500 error for any payload_
Request:
curl -X POST -H 'content-
Response:
{"code": 500, "description": "Secret creation failure seen - please contact site administrator.", "title": "Internal Server Error"}
Stacktrace:
2015-03-24 00:44:26.712 16982 ERROR barbican.api [-] Failed to validate JSON information: Provided object does not match schema 'Secret': payload_
2015-03-24 00:44:26.712 16982 TRACE barbican.api Traceback (most recent call last):
2015-03-24 00:44:26.712 16982 TRACE barbican.api File "/home/
2015-03-24 00:44:26.712 16982 TRACE barbican.api parsed_body = validator.
2015-03-24 00:44:26.712 16982 TRACE barbican.api File "/home/
2015-03-24 00:44:26.712 16982 TRACE barbican.api schema_name)
2015-03-24 00:44:26.712 16982 TRACE barbican.api File "/home/
2015-03-24 00:44:26.712 16982 TRACE barbican.api "payload_
2015-03-24 00:44:26.712 16982 TRACE barbican.api File "/home/
2015-03-24 00:44:26.712 16982 TRACE barbican.api property=property)
2015-03-24 00:44:26.712 16982 TRACE barbican.api InvalidObject: Failed to validate JSON information: Provided object does not match schema 'Secret': payload_
2015-03-24 00:44:26.712 16982 TRACE barbican.api
2015-03-24 00:44:26.716 16982 ERROR barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
2015-03-24 00:44:26.716 16982 TRACE barbican.
{address space usage: 230359040 bytes/219MB} {rss usage: 70705152 bytes/67MB} [pid: 16982|app: 0|req: 6/6] 127.0.0.1 () {30 vars in 349 bytes} [Tue Mar 24 00:44:26 2015] POST /v1/secrets => generated 131 bytes in 12 msecs (HTTP/1.1 500) 4 headers in 191 bytes (1 switches on core 0)
=== Impact: ===
Low
=== Systems Vulnerable: ===
Local environment
=== Suggested Mitigation: ===
Either:
- Don't cast to string the BarbicanHTTPExc
- Modify e.client_message so that the user-given content type is not printed whenever it does not match any of the supported ones.
Return error 415 (unsupported media type) instead of error 500 (internal server error)
=== Further References: ===
https:/
Changed in barbican: | |
assignee: | nobody → Everardo Padilla Saca (everardo-padilla-saca) |
Changed in barbican: | |
milestone: | none → kilo-rc1 |
importance: | Undecided → Medium |
Changed in barbican: | |
status: | Fix Committed → Fix Released |
Changed in barbican: | |
milestone: | kilo-rc1 → 2015.1.0 |
Fix proposed to branch: master /review. openstack. org/167044
Review: https:/