aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fextdata.php3
-rw-r--r--src/site/getsite.php6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/fextdata.php b/src/fextdata.php
index 59b2f45..187abc5 100644
--- a/src/fextdata.php
+++ b/src/fextdata.php
@@ -364,7 +364,7 @@ function getMainXML($contest,$timeo=5,$upd=false) {
LOGError("getMainXML: timeout at transfer for $siteurl");
return $logstr;
}
- $chstr = "<!-- <OK> -->\n";
+ $chstr = "<!-- <OK> --><!-- ";
if(strpos($s,$chstr) !== false) {
$logstr .= "Transfer succeeded\n";
LOGInfo("xmltransfer: OK");
@@ -375,6 +375,7 @@ function getMainXML($contest,$timeo=5,$upd=false) {
$logstr .= "Processing received data\n";
$s = substr($s, strpos($s, $chstr) + strlen($chstr));
+ $s = substr($s, 0, strpos(" -->"));
// LOGError("string: " . substr($s,0,50));
$s = decryptData($s,myhash (trim($sitedata[2])),'xml from main not ok');
if(strtoupper(substr($s,0,5)) != "<XML>") {
diff --git a/src/site/getsite.php b/src/site/getsite.php
index bbcd5f1..8e9cac1 100644
--- a/src/site/getsite.php
+++ b/src/site/getsite.php
@@ -41,14 +41,14 @@ if($ct["contestlocalsite"]==$ct["contestmainsite"]) {
$resp = importFromXML($s,$_SESSION["usertable"]["contestnumber"],$fromsite,true);
echo $resp[1];
if($resp[0])
- echo "<!-- <OK> -->\n";
+ echo "<!-- <OK> -->";
else
- echo "<!-- <NOTOK> -->\n";
+ echo "<!-- <NOTOK> -->";
}
}
if(isset($_POST['updatetime']) && is_numeric($_POST['updatetime'])) {
$xml = generateSiteXML($_SESSION["usertable"]["contestnumber"],$fromsite,$_POST['updatetime']);
- echo encryptData($xml,$u["userpassword"]);
+ echo "<!-- " . encryptData($xml,$u["userpassword"]) . " -->";
}
} else {
echo "<!-- <ERROR3> ".session_id() . " -->\n";