Changeset 169

Show
Ignore:
Timestamp:
01-11-10 10:45:28 (3 years ago)
Author:
david.vanenckevort@…
Message:

Makefile target for core.tgz fixed
Reference to unset variable in JobControl? fixed
Duplication of slashes in global_info.inc.php fixed, default for the site URL XSS safe

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r149 r169  
    5555target/core.tgz: test 
    5656        mkdir -p target 
    57         tar $(taropts) -czf $@ -C src/main/core cgi-bin cron etc html lib tools modules work db 
     57        tar $(taropts) -czf $@ -C src/main/core cgi-bin cron etc html lib tools modules db 
    5858 
    5959# doc.tgz specific rule 
  • trunk/src/main/core/lib/php/FGWeb/JobControl.php

    r156 r169  
    140140                $service = LoginService::get_instance(); 
    141141                $user = $service->get_loggedin_user(); 
    142                 if ($job->get_user() == $ud->get_username() || $ud->is_superuser()) { 
     142                if ($job->get_user() == $user->get_username() || $user->is_superuser()) { 
    143143                        $status = $job->get_status(); 
    144144                        if ($status == 'R' || $status == 'W') { 
    145                                 $result = false; 
     145                                $result = false;         
    146146                        } else { 
    147147                                $result = self::remove_dir($job->get_location()); 
  • trunk/src/main/core/lib/php/global_info.inc.php

    r131 r169  
    5858$_SESSION['globals']['www_software_test'] = $config->getValue(Configuration::SECTION_URL, 'context_test', '/test/'); 
    5959 
    60 $root_url = sprintf('http://%s', $_SERVER['SERVER_NAME']); 
    61 $root_url = trim($config->getValue(Configuration::SECTION_URL, 'site', $root_url), '/'); 
    62 $context = trim($_SESSION['globals']['www_software'], '/'); 
    63 $_SESSION['globals']['www_root_url'] = sprintf('%s/%s/', $root_url, $context); 
     60$root_url = sprintf('http://%s:%s', $_SERVER['SERVER_ADDR'], $_SERVER['SERVER_PORT']); 
     61$_SESSION['globals']['www_root_url'] = $config->getValue(Configuration::SECTION_URL, 'site', $root_url); 
    6462 
    6563// These are hardcoded to subdirectories under the main fgweb directory