mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
Privacy/GDPR friendly version (removed: Social, Gravatar, Facebook, Google, Twitter, DropBox, OwnCloud)
Also removed: POP3, OAuth2 and update feature Added: admin password_hash/password_verify Requires: PHP 7.3+ Replaced: CRLF with LF Replaced: pclZip with ZipArchive
This commit is contained in:
parent
15ceddc202
commit
2cada68f41
293 changed files with 23728 additions and 85420 deletions
|
|
@ -1024,7 +1024,7 @@ class Plugin extends DAV\ServerPlugin {
|
|||
* @param array $recipients
|
||||
* @param VObject\Component $vObject
|
||||
* @param string $principal Principal url
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
protected function iMIPMessage($originator, array $recipients, VObject\Component $vObject, $principal) {
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class Plugin extends DAV\ServerPlugin {
|
|||
public function unknownMethod($method, $uri) {
|
||||
|
||||
switch($method) {
|
||||
|
||||
|
||||
case 'PATCH':
|
||||
return $this->httpPatch($uri);
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ class Plugin extends DAV\ServerPlugin {
|
|||
*
|
||||
* This method is passed a uri. It should only return HTTP methods that are
|
||||
* available for the specified uri.
|
||||
*
|
||||
*
|
||||
* We claim to support PATCH method (partial update) if and only if
|
||||
* - the node exist
|
||||
* - the node implements our partial update interface
|
||||
|
|
@ -92,14 +92,14 @@ class Plugin extends DAV\ServerPlugin {
|
|||
* @return array
|
||||
*/
|
||||
public function getHTTPMethods($uri) {
|
||||
|
||||
|
||||
$tree = $this->server->tree;
|
||||
|
||||
if ($tree->nodeExists($uri) &&
|
||||
|
||||
if ($tree->nodeExists($uri) &&
|
||||
$tree->getNodeForPath($uri) instanceof IFile) {
|
||||
return array('PATCH');
|
||||
}
|
||||
|
||||
|
||||
return array();
|
||||
|
||||
}
|
||||
|
|
@ -118,7 +118,7 @@ class Plugin extends DAV\ServerPlugin {
|
|||
/**
|
||||
* Patch an uri
|
||||
*
|
||||
* The WebDAV patch request can be used to modify only a part of an
|
||||
* The WebDAV patch request can be used to modify only a part of an
|
||||
* existing resource. If the resource does not exist yet and the first
|
||||
* offset is not 0, the request fails
|
||||
*
|
||||
|
|
@ -138,11 +138,11 @@ class Plugin extends DAV\ServerPlugin {
|
|||
if (!$range) {
|
||||
throw new DAV\Exception\BadRequest('No valid "X-Update-Range" found in the headers');
|
||||
}
|
||||
|
||||
|
||||
$contentType = strtolower(
|
||||
$this->server->httpRequest->getHeader('Content-Type')
|
||||
);
|
||||
|
||||
|
||||
if ($contentType != 'application/x-sabredav-partialupdate') {
|
||||
throw new DAV\Exception\UnsupportedMediaType('Unknown Content-Type header "' . $contentType . '"');
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ class Plugin extends DAV\ServerPlugin {
|
|||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the HTTP custom range update header
|
||||
*
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class Filesystem extends DAV\Tree {
|
|||
public function getNodeForPath($path) {
|
||||
|
||||
$realPath = $this->getRealPath($path);
|
||||
if (!file_exists($realPath)) {
|
||||
if (!file_exists($realPath)) {
|
||||
throw new DAV\Exception\NotFound('File at location ' . $realPath . ' not found');
|
||||
}
|
||||
if (is_dir($realPath)) {
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class XMLUtil {
|
|||
|
||||
// We don't generally care about any whitespace
|
||||
$dom->preserveWhiteSpace = false;
|
||||
|
||||
|
||||
$dom->loadXML(self::convertDAVNamespace($xml),LIBXML_NOWARNING | LIBXML_NOERROR);
|
||||
|
||||
if ($error = libxml_get_last_error()) {
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ class Principal extends DAV\Node implements IPrincipal, DAV\IProperties, IACL {
|
|||
|
||||
/**
|
||||
* Updates this principals properties.
|
||||
*
|
||||
*
|
||||
* @param array $mutations
|
||||
* @see SabreForRainLoop\DAV\IProperties::updateProperties
|
||||
* @return bool|array
|
||||
|
|
|
|||
|
|
@ -164,9 +164,7 @@ class Cli {
|
|||
}
|
||||
break;
|
||||
case 'pretty' :
|
||||
if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
|
||||
$this->pretty = true;
|
||||
}
|
||||
$this->pretty = true;
|
||||
break;
|
||||
case 'forgiving' :
|
||||
$this->forgiving = true;
|
||||
|
|
@ -292,10 +290,7 @@ class Cli {
|
|||
$this->log(" vcard30, vcard40, icalendar20, jcal, jcard, json, mimedir.");
|
||||
$this->log($this->colorize('green', ' --inputformat ') . "If the input format cannot be guessed from the extension, it");
|
||||
$this->log(" must be specified here.");
|
||||
// Only PHP 5.4 and up
|
||||
if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
|
||||
$this->log($this->colorize('green', ' --pretty ') . "json pretty-print.");
|
||||
}
|
||||
$this->log($this->colorize('green', ' --pretty ') . "json pretty-print.");
|
||||
$this->log('');
|
||||
$this->log('Commands:', 'yellow');
|
||||
$this->log($this->colorize('green', ' validate') . ' source_file Validates a file for correctness.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue