@@ -82,6 +82,9 @@ public function createHttpRequest()
82
82
83
83
// path & query
84
84
$ requestUrl = isset ($ _SERVER ['REQUEST_URI ' ]) ? $ _SERVER ['REQUEST_URI ' ] : '/ ' ;
85
+ if (!$ this ->binary && (!preg_match (self ::CHARS , rawurldecode ($ requestUrl )) || preg_last_error ())) {
86
+ // TODO: invalid request
87
+ }
85
88
$ requestUrl = Strings::replace ($ requestUrl , $ this ->urlFilters ['url ' ]);
86
89
$ tmp = explode ('? ' , $ requestUrl , 2 );
87
90
$ path = Strings::fixEncoding (Strings::replace ($ tmp [0 ], $ this ->urlFilters ['path ' ]));
@@ -97,10 +100,8 @@ public function createHttpRequest()
97
100
}
98
101
$ url ->setScriptPath ($ path );
99
102
100
- // GET, POST, COOKIE
103
+ // POST, COOKIE
101
104
$ useFilter = (!in_array (ini_get ('filter.default ' ), array ('' , 'unsafe_raw ' )) || ini_get ('filter.default_flags ' ));
102
-
103
- $ query = $ url ->getQueryParameters ();
104
105
$ post = $ useFilter ? filter_input_array (INPUT_POST , FILTER_UNSAFE_RAW ) : (empty ($ _POST ) ? array () : $ _POST );
105
106
$ cookies = $ useFilter ? filter_input_array (INPUT_COOKIE , FILTER_UNSAFE_RAW ) : (empty ($ _COOKIE ) ? array () : $ _COOKIE );
106
107
@@ -111,7 +112,7 @@ public function createHttpRequest()
111
112
112
113
// remove invalid characters
113
114
if (!$ this ->binary ) {
114
- $ list = array (& $ query , & $ post , & $ cookies );
115
+ $ list = array (& $ post , & $ cookies );
115
116
while (list ($ key , $ val ) = each ($ list )) {
116
117
foreach ($ val as $ k => $ v ) {
117
118
if (is_string ($ k ) && (!preg_match (self ::CHARS , $ k ) || preg_last_error ())) {
@@ -128,7 +129,6 @@ public function createHttpRequest()
128
129
}
129
130
unset($ list , $ key , $ val , $ k , $ v );
130
131
}
131
- $ url ->setQuery ($ query );
132
132
133
133
134
134
// FILES and create FileUpload objects
0 commit comments