]> granicus.if.org Git - php/commitdiff
MFH: file upload path prunning.
authorIlia Alshanetsky <iliaa@php.net>
Tue, 15 Feb 2005 00:26:35 +0000 (00:26 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 15 Feb 2005 00:26:35 +0000 (00:26 +0000)
main/rfc1867.c

index 982d058525d2cac7cedb654a98071153ca8e326d..cc54e4e54a233b397e856e74b4ff397849e871e0 100644 (file)
@@ -1077,11 +1077,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
                                        str_len = strlen(filename);
                                        php_mb_gpc_encoding_converter(&filename, &str_len, 1, NULL, NULL TSRMLS_CC);
                                }
-#ifdef PHP_WIN32
                                s = php_mb_strrchr(filename, '\\' TSRMLS_CC);
-#else
-                               s = filename;
-#endif
                                if ((tmp = php_mb_strrchr(filename, '/' TSRMLS_CC)) > s) {
                                        s = tmp;
                                }
@@ -1090,11 +1086,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
                        }
 #endif
 
-#ifdef PHP_WIN32
                        s = strrchr(filename, '\\');
-#else
-                       s = filename;
-#endif
                        if ((tmp = strrchr(filename, '/')) > s) {
                                s = tmp;
                        }