Minor bug with regex and zmsyslogsetup

Zimbra Collaboration 8.8 Beta
User avatar
DualBoot
Outstanding Member
Outstanding Member
Posts: 741
Joined: Mon Apr 18, 2016 8:18 pm
Location: Earth
ZCS/ZD Version: ZCS FLOSS - 8.7.11 Mutli servers

Minor bug with regex and zmsyslogsetup

Postby DualBoot » Tue Jul 18, 2017 9:25 pm

Hello Team,

I got this little bug which is not blocking the installation :

Code: Select all

Tue Jul 18 23:12:34 2017 *** Running as root user: /opt/zimbra/libexec/zmsyslogsetup
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(^destination mail { <-- HERE  file\("/var/log/mail"\); };)/ at /opt/zimbra/libexec/zmsyslogsetup line 190.

I saw it in the install history log.

Regards


User avatar
msquadrat
Advanced member
Advanced member
Posts: 166
Joined: Mon Oct 14, 2013 10:09 am

Re: Minor bug with regex and zmsyslogsetup

Postby msquadrat » Wed Jul 19, 2017 9:55 am

The issue is here:

https://github.com/Zimbra/zm-core-utils ... setup#L190

Code: Select all

while (<>) {
      s/(^destination mailinfo.*)/#$1/;
      s/(^log.*f_mailinfo)/#$1/;
      s/(^destination mailwarn.*)/#$1/;
      s/(^log.*f_mailwarn)/#$1/;
      s/(^destination mailerr.*)/#$1/;
      s/(^log.*f_mailerr)/#$1/;
      s|(^destination mail { file\("/var/log/mail"\); };)|#$1|;
      s/(^log.*filter\(f_mail\); destination\(mail\); };)/#$1/;
      print;
}


Those curly braces should be escaped.

Looks like this part of the code is 7 years old, so probably not caused by the 8.8 changes but by a newer and more strict Perl version. Should be fixed anyway.
User avatar
DualBoot
Outstanding Member
Outstanding Member
Posts: 741
Joined: Mon Apr 18, 2016 8:18 pm
Location: Earth
ZCS/ZD Version: ZCS FLOSS - 8.7.11 Mutli servers

Re: Minor bug with regex and zmsyslogsetup

Postby DualBoot » Wed Jul 19, 2017 10:18 am

Thank you for the reference.

Return to “Zimbra Collaboration 8.8 Beta”

Who is online

Users browsing this forum: No registered users and 1 guest