diff --git a/scripts/zmupdate.pl.in b/scripts/zmupdate.pl.in index 9ad5a1a02..d096c70b5 100644 --- a/scripts/zmupdate.pl.in +++ b/scripts/zmupdate.pl.in @@ -96,7 +96,7 @@ my $use_log = (($> == 0) || ($> == $web_uid)); logInit( toFile=>$use_log?DEBUG:NOLOG ); logSetSignal(); -my $interactive = 1; +my $interactive = -t STDERR; # interactive if we have IO my $check = 0; my $freshen = 0; my $rename = 0; @@ -144,7 +144,7 @@ if ( ($check + $freshen + $rename + $zoneFix + $migrateEvents + ($version?1:0)) pod2usage(-exitstatus => -1); } -if ($check and ($Config{ZM_CHECK_FOR_UPDATES} or $interactive) ) { +if ($check) { if (!$interactive) { Info('Update agent starting at '.strftime('%y/%m/%d %H:%M:%S', localtime() )."\n"); } diff --git a/web/includes/csrf/csrf-magic.php b/web/includes/csrf/csrf-magic.php index b102c565a..10d200240 100644 --- a/web/includes/csrf/csrf-magic.php +++ b/web/includes/csrf/csrf-magic.php @@ -348,7 +348,7 @@ return false; return $value === csrf_hash($_COOKIE[$n], $time); case 'key': if (!$GLOBALS['csrf']['key']) { - Debug("Checking key: no key set" ); + ZM\Debug("Checking key: no key set" ); return false; } #Debug("Checking sid: $value === " . csrf_hash($GLOBALS['csrf']['key'], $time) );