@@ -678,7 +678,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
678
678
int boundary_len = 0 , cancel_upload = 0 , is_arr_upload = 0 ;
679
679
size_t array_len = 0 ;
680
680
int64_t total_bytes = 0 , max_file_size = 0 ;
681
- int skip_upload = 0 , anonymous_index = 0 , is_anonymous ;
681
+ int skip_upload = 0 , anonymous_index = 0 ;
682
682
HashTable * uploaded_files = NULL ;
683
683
multipart_buffer * mbuff ;
684
684
zval * array_ptr = (zval * ) arg ;
@@ -921,11 +921,8 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
921
921
}
922
922
923
923
if (!param ) {
924
- is_anonymous = 1 ;
925
924
param = emalloc (MAX_SIZE_ANONNAME );
926
925
snprintf (param , MAX_SIZE_ANONNAME , "%u" , anonymous_index ++ );
927
- } else {
928
- is_anonymous = 0 ;
929
926
}
930
927
931
928
/* New Rule: never repair potential malicious user input */
@@ -1138,10 +1135,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1138
1135
s = filename ;
1139
1136
}
1140
1137
1141
- if (!is_anonymous ) {
1142
- safe_php_register_variable (lbuf , s , strlen (s ), NULL , 0 );
1143
- }
1144
-
1145
1138
/* Add $foo[name] */
1146
1139
if (is_arr_upload ) {
1147
1140
snprintf (lbuf , llen , "%s[name][%s]" , abuf , array_index );
@@ -1169,10 +1162,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1169
1162
/* Add full path of supplied file for folder uploads via
1170
1163
* <input type="file" name="files" multiple webkitdirectory>
1171
1164
*/
1172
- if (!is_anonymous ) {
1173
- safe_php_register_variable (lbuf , filename , strlen (filename ), NULL , 0 );
1174
- }
1175
-
1176
1165
/* Add $foo[fullname] */
1177
1166
if (is_arr_upload ) {
1178
1167
snprintf (lbuf , llen , "%s[fullpath][%s]" , abuf , array_index );
@@ -1193,16 +1182,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1193
1182
}
1194
1183
}
1195
1184
1196
- /* Add $foo_type */
1197
- if (is_arr_upload ) {
1198
- snprintf (lbuf , llen , "%s_type[%s]" , abuf , array_index );
1199
- } else {
1200
- snprintf (lbuf , llen , "%s_type" , param );
1201
- }
1202
- if (!is_anonymous ) {
1203
- safe_php_register_variable (lbuf , cd , strlen (cd ), NULL , 0 );
1204
- }
1205
-
1206
1185
/* Add $foo[type] */
1207
1186
if (is_arr_upload ) {
1208
1187
snprintf (lbuf , llen , "%s[type][%s]" , abuf , array_index );
@@ -1225,16 +1204,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1225
1204
/* Initialize variables */
1226
1205
add_protected_variable (param );
1227
1206
1228
- /* if param is of form xxx[.*] this will cut it to xxx */
1229
- if (!is_anonymous ) {
1230
- if (temp_filename ) {
1231
- ZVAL_STR_COPY (& zfilename , temp_filename );
1232
- } else {
1233
- ZVAL_EMPTY_STRING (& zfilename );
1234
- }
1235
- safe_php_register_variable_ex (param , & zfilename , NULL , 1 );
1236
- }
1237
-
1238
1207
/* Add $foo[tmp_name] */
1239
1208
if (is_arr_upload ) {
1240
1209
snprintf (lbuf , llen , "%s[tmp_name][%s]" , abuf , array_index );
@@ -1287,19 +1256,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1287
1256
}
1288
1257
register_http_post_files_variable_ex (lbuf , & error_type , & PG (http_globals )[TRACK_VARS_FILES ], 0 );
1289
1258
1290
- /* Add $foo_size */
1291
- if (is_arr_upload ) {
1292
- snprintf (lbuf , llen , "%s_size[%s]" , abuf , array_index );
1293
- } else {
1294
- snprintf (lbuf , llen , "%s_size" , param );
1295
- }
1296
- if (!is_anonymous ) {
1297
- if (size_overflow ) {
1298
- ZVAL_STRING (& file_size , file_size_buf );
1299
- }
1300
- safe_php_register_variable_ex (lbuf , & file_size , NULL , size_overflow );
1301
- }
1302
-
1303
1259
/* Add $foo[size] */
1304
1260
if (is_arr_upload ) {
1305
1261
snprintf (lbuf , llen , "%s[size][%s]" , abuf , array_index );
0 commit comments