Disable OBJECTID capability by default due to #1640

This commit is contained in:
the-djmaze 2024-06-25 03:29:46 +02:00
parent 5a63b02782
commit c872e5afe4
3 changed files with 4 additions and 3 deletions

View file

@ -353,7 +353,7 @@ export class DomainPopupView extends AbstractViewPopup {
'STATUS=SIZE', 'STATUS=SIZE',
'THREAD' 'THREAD'
]); ]);
this.imapDisabled_capabilities(['METADATA','PREVIEW','STATUS=SIZE']); this.imapDisabled_capabilities(['METADATA','OBJECTID','PREVIEW','STATUS=SIZE']);
forEachObjectEntry(domainDefaults, (key, value) => this[key](value)); forEachObjectEntry(domainDefaults, (key, value) => this[key](value));
this.enableSmartPorts(true); this.enableSmartPorts(true);
if (oDomain) { if (oDomain) {

View file

@ -24,6 +24,7 @@
}, },
"disabled_capabilities": [ "disabled_capabilities": [
"METADATA", "METADATA",
"OBJECTID",
"PREVIEW", "PREVIEW",
"STATUS=SIZE" "STATUS=SIZE"
], ],

View file

@ -119,12 +119,12 @@ trait Status
} }
if (\property_exists(__TRAIT__, $name)) { if (\property_exists(__TRAIT__, $name)) {
if ('MAILBOXID' === $name) { if ('MAILBOXID' === $name) {
// https://github.com/the-djmaze/snappymail/issues/1640
$value = \is_array($value) ? \reset($value) : $value; $value = \is_array($value) ? \reset($value) : $value;
if (\is_string($value)) { if (\is_string($value)) {
$this->MAILBOXID = \base64_encode($value); $this->MAILBOXID = \base64_encode($value);
} else { } else {
\error_log("{$this->FullName} invalid MAILBOXID value"); // Cyrus bug https://github.com/the-djmaze/snappymail/issues/1640
\error_log("{$this->FullName} invalid MAILBOXID value. Disable the OBJECTID capability.");
} }
} else { } else {
$this->$name = (int) $value; $this->$name = (int) $value;