1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00
Go to file
Witold Filipczyk a6966e9472 Bug 991: Replace '%s' by % in the mailcap.c
Currently, when ELinks passes the name of a local file to an external
MIME handler program, it encodes the name as a URI.  Programs
typically do not expect this, and they then fail to open the file.
ELinks should instead quote the file name for the shell.
Unfortunately, Debian has lines like this in /etc/mailcap:

audio/mpeg; xmms '%s'; test=test "$DISPLAY" != ""

If ELinks were changed to replace the %s with e.g.
'/home/Kalle/doc/Topfield/How to upgraded the Firmware(English).pdf'
(quotes included), then the quotes would cancel out and the shell
would split the file name into multiple arguments.  That could even
provide a way for malicious persons to make ELinks run arbitrary
shell commands.

The examples in RFC 1524 all have %s without any quotes.
Debian has two bug reports about the quoting behaviour:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=90483
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=221717

This patch therefore tries to detect whether the %s has been quoted
already, and remove the quotes if so.  That way, the next patch will
be able to safely add its own quotes.  This removal of quotes applies
only to mailcap files; MIME handlers defined in elinks.conf should
already be in the format preferred by ELinks.

(The patch was attachment 438 of bug 991, by Witold Filipczyk.
 This commit message was written by Kalle Olavi Niemitalo.)
2008-03-08 21:20:57 +02:00
config Win32: Get socklen_t from <ws2tcpip.h>. 2007-07-18 00:41:08 +03:00
contrib s/elinks\.or\.cz/elinks.cz/ in contrib/debian/ 2008-02-28 11:55:24 +02:00
doc When releasing po files should also be updated 2008-03-08 20:15:38 +01:00
po pl.po: fixes. 2008-02-21 14:54:19 +01:00
src Bug 991: Replace '%s' by % in the mailcap.c 2008-03-08 21:20:57 +02:00
test test: raw deflate 2008-03-01 15:27:04 +02:00
Unicode Make unicode_7b[] static const. 2007-02-03 23:25:16 +02:00
.gitignore Autogenerate .vimrc files and put the master in config/vimrc 2006-01-15 18:38:58 +01:00
.mailmap Add .mailmap file to help git-shortlog 2007-04-15 22:08:11 +02:00
ABOUT-NLS
AUTHORS Strings corrections from Malcolm Parsons 2008-01-27 04:19:23 +00:00
autogen.sh autogen.sh: Also remove autom4te.cache. 2007-07-19 21:28:33 +03:00
BUGS Drop .or from elinks.or.cz. 2005-12-29 04:35:02 +00:00
ChangeLog Link to gitweb at repo.or.cz, rather than pasky.or.cz. 2007-06-21 10:29:06 +03:00
configure.in Use git tools instead of cogito for getting the build ID 2008-03-01 13:55:16 +02:00
COPYING
features.conf lzma: rephrase note about LZMA SDK 2008-03-01 13:55:01 +02:00
INSTALL Remove some suspiciously looking empty lines 2006-01-19 02:23:01 +01:00
Makefile Document that GNU Make >= 3.78 is needed, and check it. 2007-12-09 08:16:29 +02:00
Makefile.config.in Use git tools instead of cogito for getting the build ID 2008-03-01 13:55:16 +02:00
Makefile.lib Revert "Use the new OBJS-unless$(CONFIG_FOO) instead of $(call not,...)" 2007-09-14 17:43:36 +02:00
NEWS NEWS: mention bug 1000 2008-03-02 17:45:30 +02:00
README Drop .or from elinks.or.cz. 2005-12-29 04:35:02 +00:00
SITES Removed outdated entries. 2007-01-28 18:28:02 +02:00
THANKS THANKS: Remove link to HSTI webpage as the domain is for sale. 2006-11-08 20:53:01 +02:00
TODO TODO: minor rephrasing and cleanups 2007-05-28 12:04:43 +02:00

ELinks - an advanced web browser
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ELinks is an advanced and well-established feature-rich text mode web
(HTTP/FTP/..) browser. ELinks can render both frames and tables, is highly
customizable and can be extended via scripts. It is very portable and runs
on a variety of platforms.

The ELinks official website is available at

	http://elinks.cz/

Please see the SITES file for mirrors or other recommended sites.  If you
want to install ELinks on your computer, see the INSTALL file for further
instructions.

A good start point is documentation files available in doc/, especially the
file named index.txt.

If you want to request features or report bugs, see community information at
http://elinks.cz/community.html and feedback information available at
http://elinks.cz/feedback.html.

If you want to write some patches, please first read the doc/hacking.txt
document.

If you want to add a new language or update the translation for an existing
one, please read po/README document.

If you want to write some documentation, well, you're welcome! ;)



Historical notes
~~~~~~~~~~~~~~~~

Initially, ELinks was a development version of Links (Lynx-like text WWW
browser), with more liberal features policy and development style.  Its purpose
was to provide an alternative to Links, and to test and tune various new
features, but still provide good rock-solid releases inside stable branches.

Why not contribute to Links instead?  Well, first I made a bunch of patches for
the original Links, but Mikulas wasn't around to integrate them, so I started
releasing my fork. When he came back, a significant number of them got refused
because Mikulas did not like them, as he just wouldn't have any use for them
himself.  He wants to keep Links with a relatively closed feature set and merge
only new features which he himself needs.  It has advantages that the tree is
very narrow and the code is small and contains very little bloat.

ELinks, on the contrary, aims to provide a full-featured web browser, superior
to both lynx and w3m and with the power (but not slowness and memory usage) of
Mozilla, Konqueror and similar browsers. However, to prevent drastic bloating
of the code, the development is driven in the course of modularization and
separation of add-on modules (like cookies, bookmarks, ssl, scripting etc).

For more details about ELinks history, please see

	http://elinks.cz/history.html

If you are more interested in the history and various Links clones and versions,
you can examine the website at

	http://links.sf.net/




vim: textwidth=80