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