Bug#682900: mime-support: File renamed and copied to /tmp if contain Russian letters...

July 26th, 2012 - 06:10 pm ET by Oleksandr Gavenko | Report spam
Package: mime-support
Version: 3.52-1
Severity: normal

From 'htop' utility:

28077 user 20 0 122M 2584 1736 S 0.0 0.1 0:00.04 ├─ /usr/bin/perl /usr/bin/see /home/user/net/васильева_007.jpg
28081 user 20 0 4164 584 492 S 0.0 0.0 0:00.00 │ └─ sh -c gthumb '/tmp/filemVzMYj'
28082 user 20 0 623M 92168 18772 S 0.0 2.3 0:02.35 │ └─ gthumb /tmp/filemVzMYj

As you can see 'gthumb' called with file from '/tmp' dir.

When file name does not contain Russian letters 'gthumb' start from current
directory with original file name.

Why such behaviour is wrong?

Most viewers allow:

1) show files which lays in current directory (like you start one foto and
can look to another by press SPACE)
2) edit files... (not only content but important metainfo file foto author,
dates, etc!!)

As non English people I am discriminated by losing functionality available for
EN people... ((

Man page does not say about such transformation...

I think path name handling must relay on libc and kernel, not on perl
scripts...

I use 'see' intensively in '~/.config/mc/ms.ext' and does not know any
alternative under Debian...

Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

mime-support depends on no packages.

/etc/mailcap.order changed:
vlc:audio/*
vlc:video/*

Best regards!


To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 Charles Plessy
July 27th, 2012 - 01:40 am ET | Report spam
tag 682900 confirmed
thanks

Le Fri, Jul 27, 2012 at 01:00:09AM +0300, Oleksandr Gavenko a écrit :

>From 'htop' utility:

28077 user 20 0 122M 2584 1736 S 0.0 0.1 0:00.04 ├─ /usr/bin/perl /usr/bin/see /home/user/net/васильева_007.jpg
28081 user 20 0 4164 584 492 S 0.0 0.0 0:00.00 │ └─ sh -c gthumb '/tmp/filemVzMYj'
28082 user 20 0 623M 92168 18772 S 0.0 2.3 0:02.35 │ └─ gthumb /tmp/filemVzMYj

As you can see 'gthumb' called with file from '/tmp' dir.

When file name does not contain Russian letters 'gthumb' start from current
directory with original file name.



Dear Oleksandr,

thank you for your report.

Here is the code of run-mailcap that causes васильева_007.jpg to be aliased.

if ($file ne "-") {
if ($comm =~ m/[^%]%s/) {
if ($file =~ m![^ a-z0-9,.:/@%^+=_-]!i) {
$match =~ m/nametemplate=(.*?)\s*($|;)/;
my $prefix = $1;
my $linked = 0;
while (!$linked) {
$tmplink = TempFile($prefix);
unlink($tmplink);
if ($file =~ m!^/!) {
$linked = symlink($file,$tmplink);
} else {
my $pwd = `/bin/pwd`;
chomp($pwd);
$linked = symlink("$pwd/$file",$tmplink);
}
}
print STDERR " - filename contains shell meta-characters; aliased to '$tmplink'" if $debug;

As you see, the reason is to avoid shell meta-characters. This was probably
written with only ASCII in mind, we need to make it more Unicode-friendly.

If you can help us by proposing a patch that respects the original purpose,
protecting against shell meta-characters, your contribution will be most
welcome.

Otherwise, I need to ask for your patience, as there are at least two other
tasks that I think need to be completed first.

http://charles.plessy.org/Debian/de...e-support/

Have a nice week-end,

Charles Plessy
Tsurumi, Kanagawa, Japan


To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics