Advanced Multi Uploader Support Product Page

cookie check

Reported 22 Sep 2010 05:41:44
1
has this problem
22 Sep 2010 05:41:44 Miroslav Shubernetskiy posted:
I want to implement a very simple log-in check on the upload page and here is the code I am using:

$found = false;
$lp = "admin" . '%' . "test";
if ($_COOKIE['verify'] == md5($lp)) {
    $found = true;
    setcookie("verify", md5($lp), time() + 60000, '/');
}
if (!$found) {
    die("You are not logged in.");
}
unset($found);
unset($lp);


This simple code stops functionality of the Uploader. No file are uploaded and no entries are inserted into the database. If I comment out the code, it starts working fine again.

Please help.


Edited by - Miroslav Shubernetskiy on 22 Sep 2010  05:43:37

Replies

Replied 23 Sep 2010 09:39:50
23 Sep 2010 09:39:50 Miroslav Zografski replied:
Hello Miroslav,

The problem is that you are using the Flash Multiuploader. Flash currently cannot send authentication information. And here you have new session for each file uploaded, thus each time a file is uploaded a new session is started and it cannot be authenticated.
Here is an FAQ on a way to secure your Multiuploader:
www.dmxzone.com/go?16993

Regards,

Reply to this topic