From 1f7afa9c700c8bb93c833a0024f9505be7763c4d Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 14 Mar 2019 01:38:46 -0400 Subject: [doc] minor adjust create-mime.conf.pl regex match (#2942) '-' in char class should be at beginning or end, or escaped with \- so that it does not signify a char range in the char class (In the prior regex, the misuse permitted matching the comma char, which while mostly harmless, was not what was intended) x-ref: "incorrect behaviour of create-mime.assign.pl" https://redmine.lighttpd.net/issues/2942 --- doc/scripts/create-mime.conf.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/scripts/create-mime.conf.pl b/doc/scripts/create-mime.conf.pl index 969292c7..29812838 100755 --- a/doc/scripts/create-mime.conf.pl +++ b/doc/scripts/create-mime.conf.pl @@ -130,7 +130,7 @@ while () { chomp; s/\#.*//; next if /^\w*$/; - if (/^([a-z0-9\/+-.]+)\s+((?:[a-z0-9.+-]+[ ]?)+)$/i) { + if (/^([a-z0-9\/+.-]+)\s+((?:[a-z0-9+.-]+[ ]?)+)$/i) { my $mimetype = $1; my @extensions = split / /, $2; -- cgit v1.2.1