This commit is contained in:
the-djmaze 2023-12-08 21:44:25 +01:00
parent 6d58b1efb5
commit 9d7f93f304
2 changed files with 11 additions and 7 deletions

View file

@ -72,7 +72,7 @@ trait ACL
{ {
// if ($this->ACLAllow($sFolderName, 'SETACL')) { // if ($this->ACLAllow($sFolderName, 'SETACL')) {
$this->SendRequestGetResponse('SETACL', array( $this->SendRequestGetResponse('SETACL', array(
$this->EscapeString($sFolderName), $this->EscapeFolderName($sFolderName),
$this->EscapeString($sIdentifier), $this->EscapeString($sIdentifier),
$this->EscapeString($sAccessRights) $this->EscapeString($sAccessRights)
)); ));
@ -82,7 +82,7 @@ trait ACL
{ {
// if ($this->ACLAllow($sFolderName, 'DELETEACL')) { // if ($this->ACLAllow($sFolderName, 'DELETEACL')) {
$this->SendRequestGetResponse('DELETEACL', array( $this->SendRequestGetResponse('DELETEACL', array(
$this->EscapeString($sFolderName), $this->EscapeFolderName($sFolderName),
$this->EscapeString($sIdentifier) $this->EscapeString($sIdentifier)
)); ));
} }
@ -90,7 +90,7 @@ trait ACL
public function FolderGetACL(string $sFolderName) : array public function FolderGetACL(string $sFolderName) : array
{ {
// if ($this->ACLAllow($sFolderName, 'GETACL')) { // if ($this->ACLAllow($sFolderName, 'GETACL')) {
$oResponses = $this->SendRequestGetResponse('GETACL', array($this->EscapeString($sFolderName))); $oResponses = $this->SendRequestGetResponse('GETACL', array($this->EscapeFolderName($sFolderName)));
$aResult = array(); $aResult = array();
foreach ($oResponses as $oResponse) { foreach ($oResponses as $oResponse) {
if (\MailSo\Imap\Enumerations\ResponseType::UNTAGGED === $oResponse->ResponseType if (\MailSo\Imap\Enumerations\ResponseType::UNTAGGED === $oResponse->ResponseType
@ -109,7 +109,7 @@ trait ACL
{ {
// if ($this->ACLAllow($sFolderName, 'LISTRIGHTS')) { // if ($this->ACLAllow($sFolderName, 'LISTRIGHTS')) {
$oResponses = $this->SendRequestGetResponse('LISTRIGHTS', array( $oResponses = $this->SendRequestGetResponse('LISTRIGHTS', array(
$this->EscapeString($sFolderName), $this->EscapeFolderName($sFolderName),
$this->EscapeString($sIdentifier) $this->EscapeString($sIdentifier)
)); ));
foreach ($oResponses as $oResponse) { foreach ($oResponses as $oResponse) {
@ -130,7 +130,7 @@ trait ACL
{ {
// if ($this->ACLAllow($sFolderName, 'MYRIGHTS')) { // if ($this->ACLAllow($sFolderName, 'MYRIGHTS')) {
// if ($this->hasCapability('ACL')) { // if ($this->hasCapability('ACL')) {
$oResponses = $this->SendRequestGetResponse('MYRIGHTS', array($this->EscapeString($sFolderName))); $oResponses = $this->SendRequestGetResponse('MYRIGHTS', array($this->EscapeFolderName($sFolderName)));
foreach ($oResponses as $oResponse) { foreach ($oResponses as $oResponse) {
if (\MailSo\Imap\Enumerations\ResponseType::UNTAGGED === $oResponse->ResponseType if (\MailSo\Imap\Enumerations\ResponseType::UNTAGGED === $oResponse->ResponseType
&& isset($oResponse->ResponseList[3]) && isset($oResponse->ResponseList[3])

View file

@ -565,7 +565,7 @@ trait Folders
if ($bMetadata && !$aMetadata /*&& 50 < $oFolderCollection->count()*/) { if ($bMetadata && !$aMetadata /*&& 50 < $oFolderCollection->count()*/) {
foreach ($oFolderCollection as $oFolder) { foreach ($oFolderCollection as $oFolder) {
// if (2 > \substr_count($oFolder->FullName, $oFolder->Delimiter())) // if (2 > \substr_count($oFolder->FullName, $oFolder->Delimiter()))
try { if ($oFolder->Selectable()) try {
$oFolder->SetAllMetadata( $oFolder->SetAllMetadata(
$this->getMetadata($oFolder->FullName, ['/shared', '/private'], ['DEPTH'=>'infinity']) $this->getMetadata($oFolder->FullName, ['/shared', '/private'], ['DEPTH'=>'infinity'])
); );
@ -577,7 +577,11 @@ trait Folders
if ($this->hasCapability('ACL') || $this->CapabilityValue('RIGHTS')) { if ($this->hasCapability('ACL') || $this->CapabilityValue('RIGHTS')) {
foreach ($oFolderCollection as $oFolder) { foreach ($oFolderCollection as $oFolder) {
$oFolder->myRights = $this->FolderMyRights($oFolder->FullName); if ($oFolder->Selectable()) try {
$oFolder->myRights = $this->FolderMyRights($oFolder->FullName);
} catch (\Throwable $oException) {
// Ignore error
}
} }
} }