Example #1
0
                     $jResult .= "noty(theUILang.badUploadsPath2+' (" . $up . ")','error');";
                 }
                 if (!isUserHavePermission($theSettings->uid, $theSettings->gid, $st, 0x7)) {
                     $jResult .= "noty(theUILang.badSettingsPath2+' (" . $st . ")','error');";
                 }
                 if (!isUserHavePermission($theSettings->uid, $theSettings->gid, './test.sh', 0x5)) {
                     $jResult .= "noty(theUILang.badTestPath+' (" . realpath('./test.sh') . ")','error');";
                 }
             }
         }
         if ($theSettings->badXMLRPCVersion) {
             $jResult .= "noty(theUILang.badXMLRPCVersion,'error');";
         }
     }
 }
 $plg = getConfFile('plugins.ini');
 if (!$plg) {
     $plg = "../conf/plugins.ini";
 }
 $permissions = parse_ini_file($plg, true);
 $init = array();
 $names = array();
 $disabled = array();
 $phpVersion = phpversion();
 if (($pos = strpos($phpVersion, '-')) !== false) {
     $phpVersion = substr($phpVersion, 0, $pos);
 }
 $phpIVersion = explode('.', $phpVersion);
 $phpIVersion = (intval($phpIVersion[0]) << 16) + (intval($phpIVersion[1]) << 8) + intval($phpIVersion[2]);
 $phpRequired = false;
 $userPermissions = array("__hash__" => "plugins.dat");
Example #2
0
<?php

if (!isset($_GET['uh'])) {
    die('Invalid link');
}
$_SERVER['REMOTE_USER'] = base64_decode($_GET['uh']);
require_once dirname(__FILE__) . "/../../php/util.php";
//if(getConfFile('config.php') === FALSE) {die('No such file');}
echo getConfFile();
require_once dirname(__FILE__) . "/../filemanager/flm.class.php";
include dirname(__FILE__) . '/share.class.php';
$f = new FSHARE();
if (!isset($_GET['s']) || !isset($f->data[$_GET['s']]) || $f->data[$_GET['s']]['expire'] < time()) {
    die('No such file or it expired');
}
function authenticate()
{
    header('WWW-Authenticate: Basic realm="LEAVE USERNAME EMPTY!! Password only!"');
    header('HTTP/1.0 401 Unauthorized');
    echo "Not permitted\n";
    exit;
}
if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_PW'] != $f->data[$_GET['s']]['password']) {
    authenticate();
} else {
    $f->workdir = '';
    $f->send_file($f->data[$_GET['s']]['file']);
}
Example #3
0
if (function_exists('ini_set')) {
    ini_set('display_errors', false);
    ini_set('log_errors', true);
}
if (!isset($_SERVER['REMOTE_USER'])) {
    if (isset($_SERVER['PHP_AUTH_USER'])) {
        $_SERVER['REMOTE_USER'] = $_SERVER['PHP_AUTH_USER'];
    } else {
        if (isset($_SERVER['REDIRECT_REMOTE_USER'])) {
            $_SERVER['REMOTE_USER'] = $_SERVER['REDIRECT_REMOTE_USER'];
        }
    }
}
$rootPath = realpath(dirname(__FILE__) . "/..");
require_once $rootPath . '/conf/config.php';
$conf = getConfFile('config.php');
if ($conf) {
    require_once $conf;
}
require_once 'lfs.php';
if (!isset($profileMask)) {
    $profileMask = 0777;
}
if (!isset($localhosts) || !count($localhosts)) {
    $localhosts = array("127.0.0.1", "localhost");
}
function stripSlashesFromArray(&$arr)
{
    if (is_array($arr)) {
        foreach ($arr as $k => $v) {
            if (is_array($v)) {
Example #4
0
<?php

if (!isset($_GET['uh'])) {
    die('Invalid link');
}
$_SERVER['REMOTE_USER'] = base64_decode($_GET['uh']);
require_once dirname(__FILE__) . "/../../php/util.php";
if (getConfFile('config.php') === FALSE) {
    die('No such file');
}
require_once dirname(__FILE__) . "/../filemanager/flm.class.php";
include dirname(__FILE__) . '/share.class.php';
$f = new FSHARE();
if (!isset($_GET['s']) || !isset($f->data[$_GET['s']]) || $f->data[$_GET['s']]['expire'] < time()) {
    die('No such file or it expired');
}
function authenticate()
{
    header('WWW-Authenticate: Basic realm="LEAVE USERNAME EMPTY!! Password only!"');
    header('HTTP/1.0 401 Unauthorized');
    echo "Not permitted\n";
    exit;
}
if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_PW'] != $f->data[$_GET['s']]['password']) {
    authenticate();
} else {
    $f->workdir = '';
    $f->send_file($f->data[$_GET['s']]['file']);
}