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-30
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -87,7 +87,7 @@
 	## send command through pycurl
 	conn = pycurl.Curl()
 	web_buffer = io.BytesIO()
-	conn.setopt(pycurl.URL, url)
+	conn.setopt(pycurl.URL, url.encode("UTF-8"))
 	conn.setopt(pycurl.HTTPHEADER, ["Content-type: application/xml", "Accept: application/xml", "Prefer: persistent-auth", "Filter: true"])
 
 	if "cookie" in opt:
@@ -121,10 +121,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
 
