Merge "Strip out characters that should be escaped from console output"
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License
|
# under the License
|
||||||
|
|
||||||
|
import re
|
||||||
import webob
|
import webob
|
||||||
|
|
||||||
from nova import compute
|
from nova import compute
|
||||||
@@ -57,6 +58,10 @@ class ConsoleOutputController(wsgi.Controller):
|
|||||||
except exception.NotFound:
|
except exception.NotFound:
|
||||||
raise webob.exc.HTTPNotFound(_('Instance not found'))
|
raise webob.exc.HTTPNotFound(_('Instance not found'))
|
||||||
|
|
||||||
|
# XML output is not correctly escaped, so remove invalid characters
|
||||||
|
remove_re = re.compile('[\x00-\x08\x0B-\x0C\x0E-\x1F]')
|
||||||
|
output = remove_re.sub('', output)
|
||||||
|
|
||||||
return {'output': output}
|
return {'output': output}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user