473,385 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

is_uploaded_file() question

Is it a good idea to use the is_uploaded_file() function (as a
security measure) when I've uploaded a file via Post method?

Thanks...

Jul 16 '05 #1
4 2343
On Sat, 30 Aug 2003 15:31:27 GMT, Ralph Freshour <ra***@primemail.com> wrote:
Is it a good idea to use the is_uploaded_file() function (as a
security measure) when I've uploaded a file via Post method?


Yes.

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 16 '05 #2
On Sat, 30 Aug 2003 15:31:27 GMT, Ralph Freshour <ra***@primemail.com>
wrote:
Is it a good idea to use the is_uploaded_file() function (as a
security measure) when I've uploaded a file via Post method?

Thanks...


Yes, and anything else you think of. I've seen exploits using
uploaded files already.

Mike-

Mornings: Evolution in action. Only the grumpy will survive.
-----------------------------------------------------

Please note - Due to the intense volume of spam, we have
installed site-wide spam filters at catherders.com. If
email from you bounces, try non-HTML, non-encoded,
non-attachments.
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Jul 16 '05 #3
I'm having some trouble getting the function to work - it's always
evaluating to false:
if (is_uploaded_file("uploads/".$_FILES['FileToUpload']['name']))
{
// file was uploaded via http
}
else
{
// file was not uploaded via http
}

I assume I have to make this check on the server? and therefore I need
the path to where the file is located? which is in my uploads
folder...
On Sun, 31 Aug 2003 08:43:10 -0400, Michael W. Cocke
<co***@catherders.com> wrote:
On Sat, 30 Aug 2003 15:31:27 GMT, Ralph Freshour <ra***@primemail.com>
wrote:
Is it a good idea to use the is_uploaded_file() function (as a
security measure) when I've uploaded a file via Post method?

Thanks...


Yes, and anything else you think of. I've seen exploits using
uploaded files already.

Mike-

Mornings: Evolution in action. Only the grumpy will survive.
-----------------------------------------------------

Please note - Due to the intense volume of spam, we have
installed site-wide spam filters at catherders.com. If
email from you bounces, try non-HTML, non-encoded,
non-attachments.
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


Jul 16 '05 #4
Also sprach Ralph Freshour:
I'm having some trouble getting the function to work - it's always
evaluating to false:
if (is_uploaded_file("uploads/".$_FILES['FileToUpload']['name']))


Shouldn't that be
if (is_uploaded_file($_FILES['FileToUpload']))
?


Jul 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ralph Freshour | last post by:
I'm using the is_uploaded_file() function to check if I'm uploading via Http - I am using copy() and when I use the is_uploaded_file() function it returns false - am I using the wrong upload...
3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
1
by: comp.lang.php | last post by:
Consider my code: if ($this->isSuccessful && is_file($_FILES)) { // STEP 6: MOVE RESUME TO DIRECTORY $uuid = $this->sfug->getUUID(); if (!$uuid) $this->sfug->setUUID(); $uuid =...
6
exoskeleton
by: exoskeleton | last post by:
good day dear experts... i have a problem about is_uploaded_file function.. it alwayz return false..is this function available in PHP version 5.0.1 or only in later version? im using PHP 5.0.1 ...
2
by: yord | last post by:
Hello, I have a PHP based site running for 2 years without any problems. The user can upload images and I run the is_uploaded_file() method to check if the file was really uploaded via HTTP...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.