awstats produces regex warnings in version 7.4 with Perl 5.22 on Ubuntu 16.04 LTS

Bug #1585121 reported by Thorsten Schöning
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
awstats (Debian)
Fix Released
Unknown
awstats (Ubuntu)
Fix Released
High
Unassigned
Xenial
Fix Released
High
Unassigned

Bug Description

[Impact]

The main awstats script triggers the Perl deprecation warnings about unescaped braces in regexes, every time the script is run (which, by default is every 10 minutes, via cron, sending out an email with these).

[Test Case]

1. apt install awstats
2. run '/usr/share/awstats/tools/update.sh'

You should get an error because of a missing config parameter, but if this bug is present, you also get six "Unescaped left brace in regex is deprecated, ..." messages before that.

[Regression Potential]

I don't see any way this could go wrong. The patch is trivial, and is already included upstream and in yakkety.

[Original Description]

> Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\"%{ <-- HERE Referer}i\"/ at /usr/lib/cgi-bin/awstats.pl line 9043.
> Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\"%{ <-- HERE User-Agent}i\"/ at /usr/lib/cgi-bin/awstats.pl line 9044.
> Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE mod_gzip_input_size}n/ at /usr/lib/cgi-bin/awstats.pl line 9045.
> Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE mod_gzip_output_size}n/ at /usr/lib/cgi-bin/awstats.pl line 9046.
> Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE mod_gzip_compression_ratio}n/ at /usr/lib/cgi-bin/awstats.pl line 9047.
> Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(%{ <-- HERE ratio}n\)/ at /usr/lib/cgi-bin/awstats.pl line 9048.

Those warnings occur whenever we execute awstats and they can easily be fixed by escaping the "{" and "}" at the mentioned lines. In fact awstats 7.5 fixed those lines already itself:

> AWStats Changelog
> -----------------
>
> ***** 7.5 *****
>
> - Compatibility with Perl 5.22

Please consider backporting those fixes, because awstats is most likely executed by cron or such and this produces unnecessary mails with those warnings. Disabling mails on warnings/errors is of course no solution, because one would miss real configuration errors or such this way.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in awstats (Ubuntu):
status: New → Confirmed
Revision history for this message
Kaizoku (neoark) wrote :

I am ski getting flooded by this bug.

Revision history for this message
Luke Sanderlin (sanderlin) wrote :

I can confirm this bug on AWStats 7.4, Perl 5.22.1, running as a cronjob as a part of IRedMail

Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\"%{ <-- HERE Referer}i\"/ at /usr/lib/cgi-bin/awstats.pl line 9043.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\"%{ <-- HERE User-Agent}i\"/ at /usr/lib/cgi-bin/awstats.pl line 9044.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE mod_gzip_input_size}n/ at /usr/lib/cgi-bin/awstats.pl line 9045.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE mod_gzip_output_size}n/ at /usr/lib/cgi-bin/awstats.pl line 9046.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE mod_gzip_compression_ratio}n/ at /usr/lib/cgi-bin/awstats.pl line 9047.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(%{ <-- HERE ratio}n\)/ at /usr/lib/cgi-bin/awstats.pl line 9048.

Revision history for this message
Marius Gedminas (mgedmin) wrote :
Revision history for this message
Marius Gedminas (mgedmin) wrote :

Ok, so this should be already fixed in yakkety (which has version 7.5 with the fix).

It'd be nice to have an SRU for xenial.

description: updated
Revision history for this message
Marius Gedminas (mgedmin) wrote :
Joshua Powers (powersj)
Changed in awstats (Ubuntu):
importance: Undecided → High
tags: added: server-next
Changed in awstats (Ubuntu):
status: Confirmed → Fix Released
Changed in awstats (Ubuntu Xenial):
status: New → Confirmed
importance: Undecided → High
Changed in awstats (Debian):
status: Unknown → Confirmed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

ACK on the debdiff in comment #6, thanks!

I've uploaded the package for processing by the SRU team, with a couple of minor adjustments to the versioning and patch tags.

Thanks!

Changed in awstats (Ubuntu Xenial):
status: Confirmed → In Progress
Nish Aravamudan (nacc)
no longer affects: awstats (Ubuntu Yakkety)
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Thorsten, or anyone else affected,

Accepted awstats into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/awstats/7.4+dfsg-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in awstats (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Nicolas Delvaux (malizor) wrote :

I confirm the proposed fix works as expected.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package awstats - 7.4+dfsg-1ubuntu0.1

---------------
awstats (7.4+dfsg-1ubuntu0.1) xenial; urgency=medium

  * Backport upstream patch to remove regexp syntax deprecation warnings
    on Perl 5.22 (LP: #1585121).

 -- Marius Gedminas <email address hidden> Sun, 18 Sep 2016 18:48:38 +0300

Changed in awstats (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for awstats has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Robie Basak (racb)
tags: removed: server-next
Changed in awstats (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.