Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
5fda1856
Commit
5fda1856
authored
Aug 06, 2019
by
IKEDA Soji
Browse files
WWSympa: send_mail: Restrict MIME content type of uploaded HTML text.
parent
f55e49b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cgi/wwsympa.fcgi.in
View file @
5fda1856
...
...
@@ -14692,8 +14692,11 @@ sub do_send_mail {
my $page_source;
if ($in{'uploaded_file'} =~ /\S/) {
my $fh = $query->upload('uploaded_file');
unless ($fh) {
wwslog('err', 'Can\'t upload %s', $in{'uploaded_file'});
my $ctype = $query->uploadInfo($fh)->{'Content-Type'}
if $fh;
unless ($ctype and lc $ctype eq 'text/html') {
wwslog('err', 'Can\'t upload %s (%s)', $in{'uploaded_file'},
$ctype || 'unknown type');
Sympa::WWW::Report::reject_report_web(
'intern',
'cannot_upload',
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment