From 4c11dfd1453efab1ee01ba5aefffbb19c5a4d312 Mon Sep 17 00:00:00 2001 From: lars Date: Mon, 25 Aug 2008 03:17:23 +0000 Subject: [PATCH] relax filetype checks for key upload add gpg setting to example configuration file --- examples/ezmlmwebrc.dist | 4 ++++ ezmlm-web.cgi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/ezmlmwebrc.dist b/examples/ezmlmwebrc.dist index c55f70f..20517a5 100644 --- a/examples/ezmlmwebrc.dist +++ b/examples/ezmlmwebrc.dist @@ -122,3 +122,7 @@ $HTML_CSS_COLOR = "/ezmlm-web/color-red-blue.css"; # setting individually $HTML_LANGUAGE = "en"; +# turn support for encrypted mailing lists on or off - defaults to 0 (off) +# see https://systemausfall.org/toolforge/gpgpy-ezmlm for details +#$GPG_SUPPORT = 0; + diff --git a/ezmlm-web.cgi b/ezmlm-web.cgi index c56b76b..ad0d218 100755 --- a/ezmlm-web.cgi +++ b/ezmlm-web.cgi @@ -1926,7 +1926,7 @@ sub gnupg_import_key { # Sanity check my $fileinfo = $q->uploadInfo($upload_file); my $filetype = $fileinfo->{'Content-Type'}; - unless($filetype =~ m{^text/}i) { + unless (($filetype =~ m{^text/}i) || ($filetype eq 'application/pgp-encrypted')) { $warning = 'InvalidFileFormat'; warn "[ezmlm-web] mime type of uploaded file rejected: $filetype"; return (1==0);