@@ -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 );
@@ -1163,16 +1156,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1163
1156
}
1164
1157
}
1165
1158
1166
- /* Add $foo_type */
1167
- if (is_arr_upload ) {
1168
- snprintf (lbuf , llen , "%s_type[%s]" , abuf , array_index );
1169
- } else {
1170
- snprintf (lbuf , llen , "%s_type" , param );
1171
- }
1172
- if (!is_anonymous ) {
1173
- safe_php_register_variable (lbuf , cd , strlen (cd ), NULL , 0 );
1174
- }
1175
-
1176
1159
/* Add $foo[type] */
1177
1160
if (is_arr_upload ) {
1178
1161
snprintf (lbuf , llen , "%s[type][%s]" , abuf , array_index );
@@ -1195,16 +1178,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1195
1178
/* Initialize variables */
1196
1179
add_protected_variable (param );
1197
1180
1198
- /* if param is of form xxx[.*] this will cut it to xxx */
1199
- if (!is_anonymous ) {
1200
- if (temp_filename ) {
1201
- ZVAL_STR_COPY (& zfilename , temp_filename );
1202
- } else {
1203
- ZVAL_EMPTY_STRING (& zfilename );
1204
- }
1205
- safe_php_register_variable_ex (param , & zfilename , NULL , 1 );
1206
- }
1207
-
1208
1181
/* Add $foo[tmp_name] */
1209
1182
if (is_arr_upload ) {
1210
1183
snprintf (lbuf , llen , "%s[tmp_name][%s]" , abuf , array_index );
@@ -1257,19 +1230,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1257
1230
}
1258
1231
register_http_post_files_variable_ex (lbuf , & error_type , & PG (http_globals )[TRACK_VARS_FILES ], 0 );
1259
1232
1260
- /* Add $foo_size */
1261
- if (is_arr_upload ) {
1262
- snprintf (lbuf , llen , "%s_size[%s]" , abuf , array_index );
1263
- } else {
1264
- snprintf (lbuf , llen , "%s_size" , param );
1265
- }
1266
- if (!is_anonymous ) {
1267
- if (size_overflow ) {
1268
- ZVAL_STRING (& file_size , file_size_buf );
1269
- }
1270
- safe_php_register_variable_ex (lbuf , & file_size , NULL , size_overflow );
1271
- }
1272
-
1273
1233
/* Add $foo[size] */
1274
1234
if (is_arr_upload ) {
1275
1235
snprintf (lbuf , llen , "%s[size][%s]" , abuf , array_index );
0 commit comments