Bug#977686: gosa-plugin-mail: Cannot use string offset as an array in class_sieve.inc:331

Frederik Himpe fhimpe at vub.ac.be
Fri Dec 18 21:28:53 GMT 2020


Package: gosa-plugin-mail
Version: 2.7.4+reloaded3-14
Severity: normal

When using gosa on PHP 7.3, this error occurs when creating a user with
an e-mail account in Cyrus IMAP:

 Fatal error: Uncaught Error: Cannot use string offset as an array in /usr/share/gosa/plugins/personal/mail/sieve/class_sieve.inc:331 Stack trace: #0 /usr/share/gosa/plugins/personal/mail/class_mail-methods-cyrus.inc(497): sieve->sieve_login() #1 /usr/share/gosa/plugins/personal/mail/class_mailAccount.inc(957): mailMethodCyrus->saveSieveSettings() #2 /usr/share/gosa/include/class_tabs.inc(360): mailAccount->save() #3 /usr/share/gosa/plugins/admin/users/tabs_user.inc(148): tabs->save() #4 /usr/share/gosa/include/class_management.inc(844): usertabs->save() #5 /usr/share/gosa/plugins/admin/users/class_userManagement.inc(406): management->saveChanges() #6 /usr/share/gosa/include/class_management.inc(475): userManagement->saveChanges('save', Array, Array) #7 /usr/share/gosa/include/class_management.inc(183): management->handleActions(Array) #8 /usr/share/gosa/plugins/admin/users/main.inc(44): management->execute() #9 /usr/share/gosa/html/main.php(407): require('/usr/share/gosa...') #10 {main} thrown in /usr/share/gosa/plugins/personal/mail/sieve/class_sieve.inc on line 331

The attached patch fixes this problem.

-- System Information:
Debian Release: 10.7
  APT prefers stable
  APT policy: (800, 'stable'), (600, 'oldstable'), (500, 'oldoldstable'), (410, 'proposed-updates'), (300, 'testing'), (200, 'unstable'), (160, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.4.48 (SMP w/10 CPU cores)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gosa-plugin-mail depends on:
ii  gosa                 2.7.4+reloaded3-14
ii  gosa-plugin-systems  2.7.4+reloaded3-14

gosa-plugin-mail recommends no packages.

gosa-plugin-mail suggests no packages.

-- Configuration Files:
/etc/gosa/vacation/vacation_example.txt [Errno 13] Permission denied: '/etc/gosa/vacation/vacation_example.txt'

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/gosa/plugins/personal/mail/sieve/class_sieve.inc (from gosa-plugin-mail package)
-------------- next part --------------
--- plugins/personal/mail/sieve/class_sieve.inc.orig	2020-09-01 16:19:36.585529202 +0200
+++ plugins/personal/mail/sieve/class_sieve.inc	2020-12-18 22:21:46.714976257 +0100
@@ -217,7 +217,7 @@
     $this->tmpfile="";
     $this->fh=0;
     $this->len=0;
-    $this->capabilities="";
+    $this->capabilities=array();
     $this->loggedin=false;
     $this->error= "";
     $this->error_raw="";


More information about the Debian-edu-pkg-team mailing list