You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation assumes that complex input data embedded in the WPS post request is base64 encoded. This is not always the case. Probably this issue needs to fixed in both OWSLib.wps and PyWPS.
As far as I understand the standard WPS 1.0.0 is quite ill-formed, and the embedded data should be decoded as base64 only if the encoding attribute is base64.
Other encoding string does not make sense for PyWPS because the encoding of the XML data is the encoding used for the full XML document including text section. Note that etree.parse cleanup properly the escape sequence such as XML entities and CDATA pattern. Thus in my opinion the data should be the decoded string from etree with no more guesses, leaving the WPS implementation dealing with unknown encoding.
--- a/pywps/app/WPSRequest.py
+++ b/pywps/app/WPSRequest.py
@@ -775,7 +775,7 @@ def _get_rawvalue_value(data, encoding=None):
return data
elif encoding == 'base64':
return base64.b64decode(data)
- return base64.b64decode(data)
+ return data
except Exception:
LOGGER.warning("failed to decode base64")
return data
Description
The current implementation assumes that complex input data embedded in the WPS post request is base64 encoded. This is not always the case. Probably this issue needs to fixed in both
OWSLib.wps
andPyWPS
.See discussion in PR #560
Environment
Steps to Reproduce
Additional Information
The text was updated successfully, but these errors were encountered: