fixed invalid token

This commit is contained in:
printempw 2016-02-03 10:27:15 +08:00
parent 917306dbe9
commit 03b7e4e83b

View File

@ -3,7 +3,7 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-01-16 23:01:33 * @Date: 2016-01-16 23:01:33
* @Last Modified by: prpr * @Last Modified by: prpr
* @Last Modified time: 2016-02-02 23:28:03 * @Last Modified time: 2016-02-03 10:26:40
* *
* All ajax requests will be handled here * All ajax requests will be handled here
*/ */
@ -73,7 +73,7 @@ if ($action == "login") {
} }
} }
} else if ($action == "upload") { } else if ($action == "upload") {
if ($_SESSION['token'] == $user->getToken()) { if (utils::getValue('token', $_SESSION) == $user->getToken()) {
if (checkFile()) { if (checkFile()) {
if ($file = utils::getValue('skin_file', $_FILES)) { if ($file = utils::getValue('skin_file', $_FILES)) {
if ($user->setTexture('skin', $file)) { if ($user->setTexture('skin', $file)) {