Merge "Strip out characters that should be escaped from console output"
This commit is contained in:
commit
1f1b9de4bf
@ -16,6 +16,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License
|
||||
|
||||
import re
|
||||
import webob
|
||||
|
||||
from nova import compute
|
||||
@ -57,6 +58,10 @@ class ConsoleOutputController(wsgi.Controller):
|
||||
except exception.NotFound:
|
||||
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}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user