]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
added better logging for flash uploader
authorCash Costello <cash.costello@gmail.com>
Sat, 14 Jul 2012 15:05:00 +0000 (11:05 -0400)
committerCash Costello <cash.costello@gmail.com>
Sat, 14 Jul 2012 15:05:00 +0000 (11:05 -0400)
start.php

index 4db944119acc944c0ce96729839961bec95a08e3..884d53f024117db46e250014a1cff8b341206c53 100644 (file)
--- a/start.php
+++ b/start.php
@@ -488,23 +488,26 @@ function tidypics_ajax_session_handler($hook, $type, $value, $params) {
        }
 
        if (!$user) {
+               trigger_error('Tidypics warning: failed to get user in flash uploader', E_USER_WARNING);
                return;
        }
 
        if (!$token || !$ts || !$session_id || !$tidypics_token) {
+               trigger_error('Tidypics warning: token information missing in flash uploader', E_USER_WARNING);
                return;
        }
 
        $hour = 60*60;
        $now = time();
        if ($ts < $now-$hour || $ts > $now+$hour) {
+               trigger_error('Tidypics warning: failed time check in flash uploader', E_USER_WARNING);
                return;
        }
 
        $generated_token = md5($session_id . get_site_secret() . $ts . $user->salt);
 
        if ($tidypics_token !== $generated_token) {
-               error_log("Tidypics: bad tp token");
+               trigger_error('Tidypics warning: token check failed in flash uploader', E_USER_WARNING);
                return;
        }