1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-13 00:38:32 -04:00
Commit Graph

1517 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
f915c31127 Bug 841, CVE-2006-5925: Prevent enabling the SMB protocol.
src/protocol/smb/smb.c: Added #error directives so that this
vulnerable code cannot be accidentally compiled in.

features.conf: Disable CONFIG_SMB by default and explain why.

configure.in: If CONFIG_SMB is enabled, disable it and warn the user.
This is for people who have customized features.conf.
2006-11-18 20:39:01 +02:00
Miciah Dashiel Butler Masters
a90588debc Fix a grammatical error in the description for document.uri_passing
Suggested by Quiznos on IRC.
2006-11-15 20:08:02 +00:00
Kalle Olavi Niemitalo
24dbdbe899 Bug 830: Check -remote command names more strictly.
doc/remote.txt says there must be a nonempty sequence of ASCII
alphabetic characters before the opening parenthesis.  Check that
they really are ASCII characters and that the sequence is nonempty.
Thus, elinks -remote '(foo)' now treats the string as an address,
rather than as a command.
2006-11-14 00:22:06 +02:00
Kalle Olavi Niemitalo
8b8cd57941 Use new macro UCS_ORPHAN_CELL for broken double-cell characters.
UCS_ORPHAN_CELL is currently defined as U+0020 SPACE, which was
already used before this macro, so the behaviour does not change,
but the code seems clearer now.

I searched for ' ' and 32 and 0x20 and \x20, and replaced with
UCS_ORPHAN_CELL wherever UCS_NO_CHAR was involved.  However,
some BFU widgets first draw spaces and then overwrite with text;
those will require a more complex fix if UCS_ORPHAN_CELL is ever
changed to some other character.
2006-11-13 00:49:59 +02:00
Jonas Fonseca
89fd7efa3a Fix misparsing of -remote URLs containing parenthesis (bug 830)
Be more strict about the format accepted by the ELinks specific extension
to the -remote URL syntax. That is, commands must begin with a nonempty
sequence of ASCII alphabetic characters followed by optional whitespace and
an opening parenthesis. Also, document the syntax.

Fixes bug 830.
2006-11-12 18:49:05 +01:00
Kalle Olavi Niemitalo
cb02b46154 Bug 153: Refer to the bug from the docstring of bookmarks.file_format.
When I first read the warning about "NO NATIONAL CHARS SUPPORT!"
I was amazed: XML is based on Unicode, so why would the authors of the
XBEL specification have botched support for those characters?  The bug
is actually in the ELinks implementation of XBEL, and it has already
been entered in the ELinks bugzilla.  Make the documentation string
refer to that.
2006-11-12 18:47:07 +02:00
Kalle Olavi Niemitalo
7809efa1b5 Names of enum constants should be in upper case.
Requested by Miciah.
2006-11-12 14:51:18 +02:00
Kalle Olavi Niemitalo
40b6edc69d u2cp_: Make the no_nbsp_hack parameter an enum.
This is from attachment 279 of bug 811.  The change does not yet
affect any visible behaviour.
2006-11-12 14:29:09 +02:00
Kalle Olavi Niemitalo
c283b128b6 Bug 387: Treat &#013; inside <pre>...</pre> as a newline.
Recognize all of &#13; &#10; &#xA; &#xD; with any number of leading
zeroes.  (Previously only &#13; and &#x0A; were supported.)  All of
these are case insensitive.

Treat each CR+LF combination (&#13;&#10;) as a single newline.
2006-11-11 20:31:25 +02:00
Kalle Olavi Niemitalo
18f30e7886 decompress_data: Always initialize to_read, avoiding a GCC warning.
"'to_read' may be used uninitialized in this function" was a false warning
but removing it will make important warnings easier to see.
2006-11-11 14:12:39 +02:00
Miciah Dashiel Butler Masters
810a1fc591 data_compress: fix problem with decompression after recent change
Fix bug 834 (various gzip-encoded documents were being truncated),
which I introduced with commit e441361f2c.

Thanks to Witek for reporting the bug, Kalle for determining the
problematic commit, and Jonas for letting me know about the bug report(!).
2006-11-10 15:57:23 +00:00
Jonas Fonseca
f9d3824c65 Make get_fragment_content_type static 2006-11-06 18:09:11 +01:00
Laurent MONIN
cceb7b9be8 Add a missing parenthesis in option description. 2006-11-06 16:59:13 +01:00
Jonas Fonseca
b61d8d06d9 Fix crashes with various bogus BitTorrent URLs
... mainly bittorrent:// and bittorrent://x

The BitTorrent URL is supposed to contain an embedded URL pointing to a
metainfo file. If this is not the case a "custom" error message will be
shown. Also fixes calling of free_list() on an uninitialized list.

Closes bug 729.
2006-11-06 16:24:07 +01:00
Laurent MONIN
7585eedd2e Compilation fix: _GNU_SOURCE has to be defined on GNU platforms to get
strcasestr().
2006-11-06 15:27:54 +01:00
Jonas Fonseca
f33d9b004d Fix handling of links using file://localhost/
A simple "update" of Hugo Haas' patch posted for bug 107. This of course
also affects the (undocumented?) feature of file:// refering to the local
directory in that directories named "localhost" can no longer be displayed
using file://localhost. Nobody should do that anyway.
2006-11-06 05:43:48 +01:00
Jonas Fonseca
0ac97979a2 Fix warning from last patch 2006-11-06 05:35:57 +01:00
Jonas Fonseca
3ea73da7df Add support for more graceful detection of HTML content
It will grab at the first fragment of the cache entry and try to detect the
content-type by looking for valid HTML. It is very stupid for now, simply
searching for "<html>", which may be bogus in certain circumstances. And I
am not sure if this is better left out and up to the scripting backends,
e.g. SMJS can now modify the cache entry.

A feable fix for bug 396.
2006-11-06 05:15:50 +01:00
Jonas Fonseca
58c83a9f48 Never show empty filename in the what-to-do dialog
This fixes the last comment of bug 396.
2006-11-06 04:55:26 +01:00
Petr Baudis
6390c327aa Turn terminal transparency off by default
The problem is that if you run elinks in xterm with the default white
background, it will be totally unreadable if transparency is turned
on. We should default to usability in all common environments, eyecandy
lovers can do the extra setup for their specific one.

It also makes the description note that elinks still assumes the
background is black.
2006-11-05 16:28:53 +01:00
Miciah Dashiel Butler Masters
78946fd723 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-11-05 05:34:12 +00:00
Rich Felker
d2b8e06f41 gzip_read: always call gzclearerr
This is necessary when using a POSIX-compliant stdio implementation, which
will set the FILE error flag when input from the pipe is exhausted, causing
all subsequent reads to fail.
2006-11-05 04:53:42 +00:00
Miciah Dashiel Butler Masters
dfbbde1952 decompress_data: move a comment
This should have been done in commit e441361f2c.
2006-11-05 04:24:48 +00:00
Miciah Dashiel Butler Masters
6f8f41e20d decompress_data: change initial malloc size, drop init variable
Adjust the size of to_read for the initial read instead of setting the init
flag and using that later to check whether to read a smaller amount than
the value in to_read. This also affects the realloc call on the initial
read, which was allocating more memory than necessary (altho this
discrepency would be corrected with the realloc for the next read).
2006-11-05 04:21:52 +00:00
Miciah Dashiel Butler Masters
e441361f2c decompress_data: make the current state more explicit
Introduce and use the local variable state instead of determining the
current state from to_read. Localise to_read to the loop.
2006-11-05 03:42:16 +00:00
Miciah Dashiel Butler Masters
157b08609f decompress_data: remove some unnecessary code 2006-11-05 03:17:30 +00:00
Petr Baudis
8ecf87b7b7 setTimeout: Fix da assert
Yeah, Miciah, I'm an idiot, don't walk around the fact.
2006-11-05 01:13:29 +01:00
Petr Baudis
da5ec748b6 setTimeout: kill previous timer when planting a new one
Otherwise if the page installs multiple timers the old one would live
on unreferenced and possibly (likely) trigger after the document's death
and everything would go to hell.
2006-11-05 00:53:04 +01:00
Petr Baudis
74997f772c setTimeout: A more sensibel assert 2006-11-05 00:35:04 +01:00
Petr Baudis
a1866332d3 Merge with /srv/git/elinks.git 2006-11-04 13:20:36 +01:00
Petr Baudis
a3a85ef453 setTimeout: Second try to fix timer crashes 2006-11-04 13:20:29 +01:00
Jonas Fonseca
180c8befac Fix linker warning on Mac OS X by prefixing locale_charset with "elinks_"
/usr/bin/ld: warning multiple definitions of symbol _locale_charset
lib.o definition of _locale_charset in section (__TEXT,__text)
/usr/lib/libiconv.dylib(localcharset.o) definition of _locale_charset
2006-11-04 08:46:45 +01:00
Kalle Olavi Niemitalo
eb2c64633c Revert c9ce4260e5 (broke URLs as -remote arguments)
Revert commit c9ce4260e5,
which made "elinks -remote http://elinks.cz/" fail with an error
"ELinks: Cannot parse option -remote: Remote method not supported"
even though doc/remote.txt says it should open the URL in a new tab.
2006-11-04 05:06:50 +02:00
Miciah Dashiel Butler Masters
a001cfda17 Rewrite the description for document.cache.revalidation_interval again 2006-11-04 02:23:22 +00:00
Petr Baudis
cd197170d7 Fix wrongly placed -1 ;-) 2006-11-03 20:19:43 +01:00
Petr Baudis
847feea09e setTimeout: Kill timer when it timed out, fixes random crashes 2006-11-03 20:18:31 +01:00
Petr Baudis
c7863324e0 Support for document.cache.interval (set it to -1) and rename it
...to document.cache.revalidation_interval. Moreover, -1 is the default
now.
2006-11-03 19:56:55 +01:00
Petr Baudis
5af21a8d29 Fix perl pre_format_html hook wrt. binary files
When trying to view a binary file, this hook would cut it at the first
'\0'.
2006-11-03 19:22:58 +01:00
Petr Baudis
b8d8d27df4 Fix spurious gcc warning 2006-11-03 19:22:14 +01:00
Kalle Olavi Niemitalo
97f2ca5166 draw_char_data: Document the dubious unicode_to_cell call.
This was found while examining bug 821.
2006-11-02 09:23:59 +02:00
Miciah Dashiel Butler Masters
061e3aeab5 Eliminate one more unnecessary recomputation in the plaintext parser 2006-11-01 06:38:31 +00:00
Miciah Dashiel Butler Masters
2430de30f4 Eliminate some unnecessary recomputation in the plaintext parser 2006-11-01 01:35:47 +00:00
Miciah Dashiel Butler Masters
d0d03d37bb Fix overflow in the plaintext parser
Remove a bogus cell++ that was added in commit
161ccf9eae. This fixes an overflow when
loading binary files, which was making pasky sad.
2006-11-01 01:19:50 +00:00
Kalle Olavi Niemitalo
a0ed52e699 Bug 724: Quadruple ITRM_IN_QUEUE_SIZE from 16 to 64 bytes.
DEC VT510 can apparently send 46 bytes of device attributes.
2006-10-30 23:15:43 +02:00
Kalle Olavi Niemitalo
b7319a75db Bug 724: terminal: Correct parsing of ECMA-48 control sequences.
The previous version assumed the first non-digit after the CSI was the
Final Byte, for example the first semicolon in the "\E[?1;2c" report.
It then treated all subsequent bytes as typed characters.
According to Standard ECMA-48 (Fifth Edition - June 1991), there may
be any number of Parameter Bytes in the range 0x30 to 0x3F, and then
any number of Intermediate Bytes in the range 0x20 to 0x2F, between
the CSI and the Final Byte.

This version still does not support control sequences longer than
ITRM_IN_QUEUE_SIZE bytes.
2006-10-29 18:41:16 +02:00
Kalle Olavi Niemitalo
23ca645054 terminal: Treat ESC O as Alt-O if the next byte is unsuitable for SS3. 2006-10-29 18:27:54 +02:00
Witold Filipczyk
d2006fd3dd Always terminate ELinks when using -remote.
The side effect: ELinks doesn't clear screen with -remote 'openURL(...)'.
2006-10-27 18:59:36 +02:00
Miciah Dashiel Butler Masters
6a53f92179 SMJS (doc): Don't signal an error when assigning to window.status 2006-10-26 20:30:26 +00:00
Witold Filipczyk
c9ce4260e5 elinks -remote 'ping' says:
ELinks: No remote session to connect to.
but should say:
ELinks: No running ELinks found.
2006-10-26 21:01:01 +02:00
Witold Filipczyk
4bf3e2693b "If-Modified-Since" second approach.
Added document.cache.interval option. When time elapsed since previous access
to the document is less than interval then the document is taken from
the cache. Otherwise the request with filled "If-Modified-Since" and/or
"If-None-Match" header field is sent. By default interval is set to 10 minutes.
This requires the correct time to be set on your machine.
2006-10-26 11:53:30 +02:00