| @@ 492-514 (lines=23) @@ | ||
| 489 | } |
|
| 490 | ||
| 491 | // check REQUEST_METHOD in controller |
|
| 492 | if($type == 'controller') |
|
| 493 | { |
|
| 494 | $allowedMethod = $xml_info->action->{$this->act}->method; |
|
| 495 | ||
| 496 | if(!$allowedMethod) |
|
| 497 | { |
|
| 498 | $allowedMethodList[0] = 'POST'; |
|
| 499 | } |
|
| 500 | else |
|
| 501 | { |
|
| 502 | $allowedMethodList = explode('|', strtoupper($allowedMethod)); |
|
| 503 | } |
|
| 504 | ||
| 505 | if(!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList)) |
|
| 506 | { |
|
| 507 | $this->error = "msg_invalid_request"; |
|
| 508 | $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); |
|
| 509 | $oMessageObject->setError(-1); |
|
| 510 | $oMessageObject->setMessage($this->error); |
|
| 511 | $oMessageObject->dispMessage(); |
|
| 512 | return $oMessageObject; |
|
| 513 | } |
|
| 514 | } |
|
| 515 | ||
| 516 | if($this->module_info->use_mobile != "Y") |
|
| 517 | { |
|
| @@ 642-664 (lines=23) @@ | ||
| 639 | ||
| 640 | // SECISSUE also check foward act method |
|
| 641 | // check REQUEST_METHOD in controller |
|
| 642 | if($type == 'controller') |
|
| 643 | { |
|
| 644 | $allowedMethod = $xml_info->action->{$forward->act}->method; |
|
| 645 | ||
| 646 | if(!$allowedMethod) |
|
| 647 | { |
|
| 648 | $allowedMethodList[0] = 'POST'; |
|
| 649 | } |
|
| 650 | else |
|
| 651 | { |
|
| 652 | $allowedMethodList = explode('|', strtoupper($allowedMethod)); |
|
| 653 | } |
|
| 654 | ||
| 655 | if(!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList)) |
|
| 656 | { |
|
| 657 | $this->error = "msg_invalid_request"; |
|
| 658 | $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); |
|
| 659 | $oMessageObject->setError(-1); |
|
| 660 | $oMessageObject->setMessage($this->error); |
|
| 661 | $oMessageObject->dispMessage(); |
|
| 662 | return $oMessageObject; |
|
| 663 | } |
|
| 664 | } |
|
| 665 | ||
| 666 | if($type == "view" && Mobile::isFromMobilePhone()) |
|
| 667 | { |
|