Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some bugs related to urlize mode #900

Merged
merged 3 commits into from
Mar 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cgi/wwsympa.fcgi.in
Original file line number Diff line number Diff line change
Expand Up @@ -15358,6 +15358,7 @@ sub do_attach {
# view a file
$param->{'file'} = $doc;
$param->{'bypass'} = 'asis';
print "Content-Disposition: attachment\n";

## File type
if ($in{'file'} =~ /\.(\w+)$/) {
Expand Down
11 changes: 4 additions & 7 deletions src/lib/Sympa/Message.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1443,10 +1443,8 @@ sub _merge_msg {
}

# Check for attchment-part, which should not be changed
my $cdisposition = $entity->head->mime_attr('Content-Disposition');
if ($cdisposition and lc($cdisposition) eq 'attachment') {
$log->syslog('notice',
'Detected part with Content-Disposition. Not changing it!');
if ('attachment' eq
lc($entity->head->mime_attr('Content-Disposition') // '')) {
return $entity;
}

Expand Down Expand Up @@ -2109,9 +2107,8 @@ sub _urlize_parts {

## Clean up Message-ID and preventing double percent encoding.
my $dir1 = Sympa::Tools::Text::encode_filesystem_safe($message_id);
#XXX$dir1 = '/' . $dir1;
unless (mkdir "$expl/$dir1", 0775) {
$log->syslog('err', 'Unable to create urlized directory %s/%s',
unless (-d "$expl/$dir1" or mkdir "$expl/$dir1", 0775) {
$log->syslog('err', 'Unable to create urlized directory %s/%s: %m',
$expl, $dir1);
return 0;
}
Expand Down