| @@ 479-501 (lines=23) @@ | ||
| 476 | } |
|
| 477 | ||
| 478 | // check REQUEST_METHOD in controller |
|
| 479 | if($type == 'controller') |
|
| 480 | { |
|
| 481 | $allowedMethod = $xml_info->action->{$this->act}->method; |
|
| 482 | ||
| 483 | if(!$allowedMethod) |
|
| 484 | { |
|
| 485 | $allowedMethodList[0] = 'POST'; |
|
| 486 | } |
|
| 487 | else |
|
| 488 | { |
|
| 489 | $allowedMethodList = explode('|', strtoupper($allowedMethod)); |
|
| 490 | } |
|
| 491 | ||
| 492 | if(!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList)) |
|
| 493 | { |
|
| 494 | $this->error = "msg_invalid_request"; |
|
| 495 | $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); |
|
| 496 | $oMessageObject->setError(-1); |
|
| 497 | $oMessageObject->setMessage($this->error); |
|
| 498 | $oMessageObject->dispMessage(); |
|
| 499 | return $oMessageObject; |
|
| 500 | } |
|
| 501 | } |
|
| 502 | ||
| 503 | if($this->module_info->use_mobile != "Y") |
|
| 504 | { |
|
| @@ 629-651 (lines=23) @@ | ||
| 626 | ||
| 627 | // SECISSUE also check foward act method |
|
| 628 | // check REQUEST_METHOD in controller |
|
| 629 | if($type == 'controller') |
|
| 630 | { |
|
| 631 | $allowedMethod = $xml_info->action->{$forward->act}->method; |
|
| 632 | ||
| 633 | if(!$allowedMethod) |
|
| 634 | { |
|
| 635 | $allowedMethodList[0] = 'POST'; |
|
| 636 | } |
|
| 637 | else |
|
| 638 | { |
|
| 639 | $allowedMethodList = explode('|', strtoupper($allowedMethod)); |
|
| 640 | } |
|
| 641 | ||
| 642 | if(!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList)) |
|
| 643 | { |
|
| 644 | $this->error = "msg_invalid_request"; |
|
| 645 | $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); |
|
| 646 | $oMessageObject->setError(-1); |
|
| 647 | $oMessageObject->setMessage($this->error); |
|
| 648 | $oMessageObject->dispMessage(); |
|
| 649 | return $oMessageObject; |
|
| 650 | } |
|
| 651 | } |
|
| 652 | ||
| 653 | if($type == "view" && Mobile::isFromMobilePhone()) |
|
| 654 | { |
|