This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree 3 files changed +14
-1
lines changed 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,9 @@ public function viewAction()
160
160
$ folder_id = $ this ->getParam ('folderId ' );
161
161
$ folder = $ this ->Folder ->load ($ folder_id );
162
162
163
- if (!isset ($ folder_id )) {
163
+ if (!$ this ->_request ->isGet ()) {
164
+ throw new Zend_Exception ('Only HTTP Get requests are accepted ' , 400 );
165
+ } elseif (!isset ($ folder_id )) {
164
166
throw new Zend_Exception ('Please set the folderId. ' );
165
167
} elseif ($ folder === false ) {
166
168
throw new Zend_Exception ("The folder doesn't exist. " , 404 );
Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ public function editmetadataAction()
112
112
*/
113
113
public function viewAction ()
114
114
{
115
+ if (!($ this ->_request ->isGet () || $ this ->_request ->isPost ())) {
116
+ throw new Zend_Exception ('Only HTTP Get or Post requests are accepted ' , 400 );
117
+ }
118
+
115
119
$ this ->view ->Date = $ this ->Component ->Date ;
116
120
$ itemId = $ this ->getParam ('itemId ' );
117
121
Original file line number Diff line number Diff line change @@ -699,6 +699,10 @@ public function userexistsAction()
699
699
/** Settings page action */
700
700
public function settingsAction ()
701
701
{
702
+ if (!($ this ->_request ->isGet () || $ this ->_request ->isPost ())) {
703
+ throw new Zend_Exception ('Only HTTP Get or Post requests are accepted ' , 400 );
704
+ }
705
+
702
706
if (!$ this ->logged ) {
703
707
$ this ->disableView ();
704
708
@@ -1061,6 +1065,9 @@ public function settingsAction()
1061
1065
/** User page action */
1062
1066
public function userpageAction ()
1063
1067
{
1068
+ if (!$ this ->_request ->isGet ()) {
1069
+ throw new Zend_Exception ('Only HTTP Get requests are accepted ' , 400 );
1070
+ }
1064
1071
$ this ->view ->Date = $ this ->Component ->Date ;
1065
1072
$ user_id = $ this ->getParam ('user_id ' );
1066
1073
You can’t perform that action at this time.
0 commit comments