Description: fence_rhevm fix for CVE-2019-10153
 Import upstream security patches.
Author: Oyvind Albrigtsen <oalbrigt@redhat.com>
Origin: upstream
Bug-RHEL: https://bugzilla.redhat.com/show_bug.cgi?id=1716286
Reviewed-by: Valentin Vidic <vvidic@debian.org>
Last-Update: 2019-06-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/agents/rhevm/fence_rhevm.py
+++ b/agents/rhevm/fence_rhevm.py
@@ -88,7 +88,7 @@
 	## send command through pycurl
 	conn = pycurl.Curl()
 	web_buffer = io.BytesIO()
-	conn.setopt(pycurl.URL, url.encode("ascii"))
+	conn.setopt(pycurl.URL, url.encode("UTF-8"))
 	conn.setopt(pycurl.HTTPHEADER, [
 		"Version: 3",
 		"Content-type: application/xml",
@@ -128,10 +128,10 @@
 
 		opt["cookie"] = cookie
 
-	result = web_buffer.getvalue().decode()
+	result = web_buffer.getvalue().decode("UTF-8")
 
-	logging.debug("%s\n", command)
-	logging.debug("%s\n", result)
+	logging.debug("%s\n", command.encode("UTF-8"))
+	logging.debug("%s\n", result.encode("UTF-8"))
 
 	return result
 
