diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-10-30 17:51:25 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-10-30 17:51:25 +0000 |
| commit | 6afcfee58309ec7932e94deda56324f76bebff5f (patch) | |
| tree | 8cac39cc1b3e5e4b3092e4ef75e22a9c1d138b31 /src/site/getsite.php | |
| parent | 496f25fc597fc66125fc2bc964905c071f2ead11 (diff) | |
| download | boca-6afcfee58309ec7932e94deda56324f76bebff5f.tar.gz boca-6afcfee58309ec7932e94deda56324f76bebff5f.zip | |
encode data properly
Diffstat (limited to 'src/site/getsite.php')
| -rw-r--r-- | src/site/getsite.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/site/getsite.php b/src/site/getsite.php index 2ff555e..bf4a609 100644 --- a/src/site/getsite.php +++ b/src/site/getsite.php @@ -36,10 +36,11 @@ if($ct["contestlocalsite"]==$ct["contestmainsite"]) { // $fp=fopen('/tmp/aaa',"w"); fwrite($fp,$_POST['xml']); fclose($fp); if(!isset($gc['doenc']) || $gc['doenc']) $s = decryptData($_POST['xml'],$u["userpassword"],'xml from local not ok'); - else $s = $_POST['xml']; + else $s = base64_decode($_POST['xml']); // $fp=fopen('/tmp/aaa1',"w"); fwrite($fp,$s); fclose($fp); if(strtoupper(substr($s,0,5)) != "<XML>") { echo "<!-- <ERROR8> ".session_id() . " -->\n"; + echo "<!-- <NOTOK> -->"; } else { $resp = importFromXML($s,$_SESSION["usertable"]["contestnumber"],$fromsite,true); echo $resp[1]; @@ -54,7 +55,7 @@ if($ct["contestlocalsite"]==$ct["contestmainsite"]) { if(!isset($gc['doenc']) || $gc['doenc']) echo "<!-- " . encryptData($xml,$u["userpassword"]) . " -->"; else - echo "<!-- " . $xml . " -->"; + echo "<!-- " . base64_encode($xml) . " -->"; } } else { echo "<!-- <ERROR3> ".session_id() . " -->\n"; |