Cannot base64 Decode Post



http://ift.tt/1t2KVf8


I am using a web based service to base64 encode an xml blob, after I remove line breaks. I am then using this encoded xml blob as a payload to make a POST request, which I am doing using Advanced Rest Client, an open source tool in google apps, I can confirm that the post is appearing properly, as follows with:



$messageX = $_POST['SAMLResponse'];
log_message("INFO", $messageX);


The contents that are spit out to the log raw are correctly showing what the incoming payload was, but when I do:



log_message("INFO", base64_decode($messageX));


I will get half of the plaintext xml file, and half characters like this:



???%???????M??????ɕY??ՔBJA/WZhNl861VlZvOVdH/PkBxV<KeyInfo xmlns="http://ift.tt/uq6naF


Not sure what is happening here, this seems relatively trivial. I think I have provided enough information about the process, I will be happy to elaborate and edit with a comment.


No comments:

Post a Comment