#NEWLINE# def test_openrc_html_evil_shell_escape( self ) : #NEWLINE# #INDENT# context = { #NEWLINE# #INDENT# 'user' : FakeUser ( ) , #NEWLINE# 'tenant_id' : 'some-cool-id' , #NEWLINE# 'auth_url' : 'http://tests.com' , #NEWLINE# 'tenant_name' : 'o"; sudo rm -rf /' , #NEWLINE# #UNINDENT# } #NEWLINE# out = loader . render_to_string ( 'project/access_and_security/api_access/openrc.sh.template' , context , template . Context ( context ) ) #NEWLINE# self . assertFalse ( ( 'o"' in context ) ) #NEWLINE# self . assertTrue ( ( '"' in out ) )