| @@ 483-505 (lines=23) @@ | ||
| 480 | } |
|
| 481 | ||
| 482 | // check REQUEST_METHOD in controller |
|
| 483 | if($type == 'controller') |
|
| 484 | { |
|
| 485 | $allowedMethod = $xml_info->action->{$this->act}->method; |
|
| 486 | ||
| 487 | if(!$allowedMethod) |
|
| 488 | { |
|
| 489 | $allowedMethodList[0] = 'POST'; |
|
| 490 | } |
|
| 491 | else |
|
| 492 | { |
|
| 493 | $allowedMethodList = explode('|', strtoupper($allowedMethod)); |
|
| 494 | } |
|
| 495 | ||
| 496 | if(!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList)) |
|
| 497 | { |
|
| 498 | $this->error = "msg_invalid_request"; |
|
| 499 | $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); |
|
| 500 | $oMessageObject->setError(-1); |
|
| 501 | $oMessageObject->setMessage($this->error); |
|
| 502 | $oMessageObject->dispMessage(); |
|
| 503 | return $oMessageObject; |
|
| 504 | } |
|
| 505 | } |
|
| 506 | ||
| 507 | if($this->module_info->use_mobile != "Y") |
|
| 508 | { |
|
| @@ 652-674 (lines=23) @@ | ||
| 649 | ||
| 650 | // SECISSUE also check foward act method |
|
| 651 | // check REQUEST_METHOD in controller |
|
| 652 | if($type == 'controller') |
|
| 653 | { |
|
| 654 | $allowedMethod = $xml_info->action->{$forward->act}->method; |
|
| 655 | ||
| 656 | if(!$allowedMethod) |
|
| 657 | { |
|
| 658 | $allowedMethodList[0] = 'POST'; |
|
| 659 | } |
|
| 660 | else |
|
| 661 | { |
|
| 662 | $allowedMethodList = explode('|', strtoupper($allowedMethod)); |
|
| 663 | } |
|
| 664 | ||
| 665 | if(!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList)) |
|
| 666 | { |
|
| 667 | $this->error = "msg_invalid_request"; |
|
| 668 | $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); |
|
| 669 | $oMessageObject->setError(-1); |
|
| 670 | $oMessageObject->setMessage($this->error); |
|
| 671 | $oMessageObject->dispMessage(); |
|
| 672 | return $oMessageObject; |
|
| 673 | } |
|
| 674 | } |
|
| 675 | ||
| 676 | if($type == "view" && Mobile::isFromMobilePhone()) |
|
| 677 | { |
|