Commit 53fc468c46282e5c16e9237f11964e946a56556d

Authored by Benjamin Renard
1 parent b9a2fc5c

Fix for #7842

src/InputOutput/IHMImpl/Params/IHMInputOutputParamsAbstractClass.php
... ... @@ -54,7 +54,9 @@ abstract class IHMInputOutputParamsAbstractClass implements InputOutputInterface
54 54 */
55 55 protected function getTask($input)
56 56 {
57   - return $input->nodeType;
  57 + if (isset($input->nodeType))
  58 + return $input->nodeType;
  59 + return NULL;
58 60 }
59 61  
60 62 /*
... ...
src/Request/ParamsRequestImpl/Nodes/NodeClass.php
... ... @@ -116,7 +116,7 @@ class NodeClass
116 116 $xmlNode = $doc->createElement($this->getName());
117 117  
118 118 if ($this->getValue() != "")
119   - $xmlNode->nodeValue = $this->getValue();
  119 + $xmlNode->nodeValue = htmlspecialchars($this->getValue());
120 120  
121 121 foreach ($this->attributes as $key => $value)
122 122 $xmlNode->setAttribute($key,$value);
... ...
src/Request/ParamsRequestImpl/ParamsRequestClass.php
... ... @@ -233,9 +233,10 @@ class ParamsRequestClass extends ProcessRequestClass
233 233 public function run()
234 234 {
235 235 $amdaStat = new AmdaStats(IHMConfigClass::getUserName());
236   -
237   - if (count($this->requestData->getDatasetForStat()) > 0)
238   - $amdaStat->addTask(IHMConfigClass::getUserName(), $this->requestData->getTask(), $this->requestData->getDatasetForStat());
  236 +
  237 + $task = $this->requestData->getTask();
  238 + if (isset($task) && (count($this->requestData->getDatasetForStat()) > 0))
  239 + $amdaStat->addTask(IHMConfigClass::getUserName(), $task, $this->requestData->getDatasetForStat());
239 240  
240 241 return parent::run();
241 242 }
... ...