From: vincent@cubedesigners.com Date: Mon, 10 Jan 2011 13:17:47 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=774000c43d187b8633132239164371ad88395638;p=cubeextranet.git --- diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index e4922e04a..c6bc68b08 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -14,8 +14,11 @@ class wsServices extends cubeFlashGateway { // Check protection hash $hash = md5(substr($this->args['fromemail'], 2, 6) . substr($this->args['email'], 3, 5) . 'SFGHF566!S' . $this->args['id']); if ($hash != $this->args['hash']) { + $this->xml->addChild('hashOK', '0'); $this->xml->addChild('ok', '0'); return; + } else { + $this->xml->addChild('hashOK', '1'); } // Send the email $mail = new cubeMail(); diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index f5492fc89..4f90354e4 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -508,6 +508,12 @@ class wsDAOBook extends extranetDAO { $index = ''; $textes = ''; + $hash = $book_id; + $hash .= 'kjgl!az4.'; + $hash .= count($pages); + $hash .= round($size[0]); + $hash = sha1($hash); + $this->makeTextsIndexes($book_id, $index, $textes); $daoDoc->getLinksAndRulers($book_id, $links, $rulers); @@ -576,6 +582,7 @@ class wsDAOBook extends extranetDAO { $flex->addFont(FONT_PATH . '/' . $lang->font, 'GeneralFont', $lang->charset); $flex->addFont(FONT_PATH . '/FluidbookCredits.ttf', 'CreditsFont', 'ASCII'); $flexLight->addFont(FONT_PATH . '/FluidbookLoader.ttf', 'LoaderFont', 'Numerals'); + $flexLight->addVariable('checksum', $hash, false, true, 'String'); $res .= $flex->compile() . "\n\n-------------------\n\n"; $flexLight->addVariable('datasSize', filesize($compilerDir . '/FluidbookDatas.swf')); $res .= $flexLight->compile();