1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-30 03:26:23 -04:00
Commit Graph

772 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
644908c130 Garbage-collect SMJS objects before flushing caches.
[ Backported from commit c33d195ff4 in
  ELinks 0.12.GIT.  --KON ]
2007-05-28 11:14:00 +03:00
Kalle Olavi Niemitalo
b935fbc6ca Bug 461: Ensure contrast when filling with spaces.
So that the cursor will be visible in the Linux console.

[ From commit c2ca46cb81 in ELinks
  0.12.GIT.  --KON ]
2007-05-28 11:08:06 +03:00
Jonas Fonseca
928f364ba2 Check if the program path contains "src/" before using ../po files
Don't look for gettext message catalogs in ../po/ unless ELinks is being
run as src/elinks, ./src/elinks, or .../src/elinks.

Discovered by Arnaud Giersch, this alternate fix (than what is in debian
package 0.11.1-1.4) closes debian bug #417789 and redhat bug #235411.
Also reported in: CVE-2007-2027.

Restricting it to only work with --enable-debug was also considered,
however, it is an important feature for translaters so this less
paranoid fix was chosen.
2007-05-03 12:39:22 +02:00
Kalle Olavi Niemitalo
ba1f7d3b95 Bug 788: Define n_a variables if the POPpx macro of Perl needs them.
The configure script checks whether it is possible to compile a use of
POPpx without an n_a variable; if not, the source code then defines
those variables.  This is slower than including Perl's patchlevel.h
and comparing the version numbers to 5.8.8 but I expect this to be
more reliable as well.

[ Backported from commit 432969a3a9 in
  ELinks 0.12.GIT.  --KON ]
2007-05-02 00:47:11 +03:00
Petr Baudis
aedb588e2b 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'.

[ From commit 5af21a8d29 in ELinks
  0.12.GIT.  --KON ]
2007-05-02 00:27:58 +03:00
Petr Baudis
6aa6a71c23 Fix compilation of perl hooks
It complains here that n_a might be used uninitialized and POPpx doesn't
set anything like it.

[ From commit 0f8ee055db in ELinks
  0.12.GIT.  --KON ]
2007-05-02 00:27:10 +03:00
Miciah Dashiel Butler Masters
4895620e09 Fix IPv4 DNS lookup bug
In revision 1.15 of dns.c (as it was called way back then), pasky
backported a fix from Links 0.97pre2 to try gethostbyaddr before
trying gethostbyname for DNS lookups:

   MacOS address resolution fix (Aldy Hernandez) (from 0.97pre2)

However, that fix introduced a bug, because it was calling gethostbyaddr
on all addresses, not just IP addresses. Mikulas fixed that bug in Links
0.98:

   Do not call gethostbyaddr when name is not ip address (it should avoid
   some useless nameserver queries)'

This fix was never backported to ELinks. Until today.

This commit is functionally the same as the fix in Links 0.98, plus it uses
inet_aton for great correctness!

This fixes a bug reported in #elinks by tnks, whereby lookups for
yubnub.org resulted in 121.117.98.110 == 0x7975626E == 'y', 'u', 'b', 'n'.
I believe that it also fixes bug 691 (which is already closed with a
workaround).

[ From commit 8344dfe6c9 in ELinks
  0.12.GIT.  --KON ]
2007-05-01 23:56:08 +03:00
Jonas Fonseca
ed29b38a9a Never show empty filename in the what-to-do dialog
This fixes the last comment of bug 396.

[ From commit 58c83a9f48 in ELinks
  0.12.GIT.  --KON ]
2007-05-01 16:19:59 +03:00
Kalle Olavi Niemitalo
14588b9455 Debian bug 380347: Prevent a buffer overflow in entity_cache.
[ From commit 341d54151f in ELinks
  0.12.GIT.  --KON ]
2007-05-01 15:00:57 +03:00
Kalle Olavi Niemitalo
887d650efe Revert 2d6840b9, "Only set the socket protocol family on success."
Revert commit 2d6840b9bd9d3a7a45a5ad92b4e98ff7224d6d97.  It is causing
passive FTP via IPv6 to fail on ftp.funet.fi.  ELinks sends PASV and
the server says "425 You cannot use PASV on IPv6 connections. Use EPSV
instead."

[ Backported from commit c0f488251f in
  ELinks 0.12.GIT.  --KON ]
2007-05-01 14:43:05 +03:00
Kalle Olavi Niemitalo
7e025e6eb5 html_textarea: Use memmove rather than memcpy.
This is an overlapping copy and memcpy is not required to support that.

[ From commit a58345f4e7 in ELinks
  0.12.GIT.  --KON ]
2007-05-01 14:40:37 +03:00
Kalle Olavi Niemitalo
44a4ec5cbc Document the meaning of document_options.cp.
Miciah provided part of the text.

[ From commit 487a047264 in ELinks
  0.12.GIT.  --KON ]
2007-05-01 14:23:05 +03:00
Kalle Olavi Niemitalo
612311ffb4 Bug 947, set_hline: Respect wrap_nbsp also if !part->document.
[ Backported from commit ce05aa1f37 in ELinks
  0.12.GIT.  The earlier commit 0b7a56f89a
  changes the CONFIG_UTF8 variant of set_hline, and that does not exist in
  ELinks 0.11.  --KON ]
2007-05-01 14:14:18 +03:00
Kalle Olavi Niemitalo
a7980fcffc Bugs 879, 928, 947: Specially map U+00A0 and U+00AD in translation tables.
[ Backported from commit da3c8c5ce2 in
  ELinks 0.12.GIT.  --KON ]
2007-05-01 14:09:04 +03:00
Kalle Olavi Niemitalo
dd7a3ad95b Bug 879: New constant UCS_SOFT_HYPHEN; use where applicable.
[ Backported from commit 70dc594d93 in
  ELinks 0.12.GIT.  --KON ]
2007-05-01 14:08:34 +03:00
Kalle Olavi Niemitalo
a04af526ed Bug 947, u2cp_: Use UCS_NO_BREAK_SPACE instead of 0xa0.
[ Backported from commit 9d6c0b13e8 in
  ELinks 0.12.GIT.  --KON ]
2007-05-01 14:05:41 +03:00
Kalle Olavi Niemitalo
806fe16027 Bug 712, ssl_set_no_tls: Disable TLS protocols for GnuTLS too.
And log this in NEWS, although that may have to be reverted later if
it turns out this change just hides a real bug elsewhere in ELinks.

[ Backported from commit 2f25d3e57c in
  ELinks 0.12.GIT.  --KON ]
2007-05-01 12:45:26 +03:00
Simon Josefsson
b1bfa78d1a Use gnutls_set_default_priority.
Thereby enabling TLS 1.2 on GnuTLS versions that support it.

[ From commit 82edb1f892 in ELinks
  0.12.GIT.  --KON ]
2007-05-01 12:44:41 +03:00
Kalle Olavi Niemitalo
711fc8c30a l_pipe_read: Don't leak the old block if mem_realloc fails.
[ From commit 699663614a in ELinks
  0.12.GIT.  --KON ]
2007-05-01 12:44:35 +03:00
Kalle Olavi Niemitalo
ba1cef8db4 Bug 945: Don't crash if the error message is not a string.
[ From commit c645ed7485 in ELinks
  0.11.2.GIT.  --KON ]
2007-05-01 12:25:22 +03:00
Jonas Fonseca
4ddec1e3f2 Fix warning from last patch
[ From commit 0ac97979a2 in ELinks
  0.12.GIT.  Related to bug 396.  --KON ]
2007-04-15 10:21:41 +03:00
Kalle Olavi Niemitalo
71ff470f2e Bug 941: Survive an unexpected number of 227 or 229 FTP responses.
And document the functions a little.

[ From bug 941 attachment 361.  --KON ]
2007-04-12 00:43:43 +03:00
Jonas Fonseca
51572671c9 Fix assertion failure in the charset menu related to special codepages
If the codepage option was set to utf-8 (a special codepage) it would
end up being out of range when used for the initialy selected menu item.

[ From commit a72a0dab08 in ELinks 0.12.GIT.
  ELinks 0.11 doesn't support UTF-8 as the terminal codepage, but the
  System codepage could cause a similar assertion failure.  ELinks 0.11.2
  did not yet have this bug.  --KON ]
2007-04-09 12:19:08 +03:00
Jonas Fonseca
69740ca021 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.

[ From commit b61d8d06d9 in ELinks
  0.12.GIT.  This introduces a new string that perhaps won't be
  translated in time for 0.11.3, but I think it's better to display
  an error message in the wrong language than crash.  --KON ]
2007-04-09 10:08:50 +03:00
Laurent MONIN
f835a27e25 Fix crash due to untested null pointer occuring when doing
HTTP_PROXY=8080:proxy.ucv.cl elinks http://wwww.google.cl. Thanks to
Karel Zak.

[ From commit 947c1730a6 in ELinks 0.12.GIT.
  This crash occurs in ELinks 0.11.0 but not in 0.10.6.  --KON ]
2007-04-07 11:15:47 +03:00
Miciah Dashiel Butler Masters
a495814482 Decode the fragment identifier extracted from the URI when looking it up
This fixes a problem with fragment references that was reported
by Thomas Adam.

[ Backported from commit c22f38413e in
  ELinks 0.12.GIT, without changing localizable strings.  --KON ]
2007-04-07 10:51:38 +03:00
Kalle Olavi Niemitalo
b5bbcb2f3a do_auth_dialog: Fix off-by-one error leading to reads of uninitialized memory.
This bug manifested as a junk character at the end of the text in the
authentication dialog.

[ From commit ca496aa2dd in ELinks
  0.12.GIT.  --KON ]
2007-04-06 22:38:46 +03:00
Miciah Dashiel Butler Masters
40f5e23fb0 Secure file saving: restore umask after _all_ failure conditions
The secure file saving code plays some shenanigans with the umask.
Previously, the code could fail to restore the old umask when certain libc
calls failed: malloc, mkstemp, fdopen, and fopen. This resulted in
unrelated code creating files with the wrong umode. Specifically, the
download code's automatic directory creation was creating directories
without the execute permission bit.

Thanks to Quiznos for reporting and helping to track the problem down.

[ Backported from commit 7f0fb0440c in
  ELinks 0.12.GIT.  The general download code in 0.11.2.GIT does not
  automatically create directories but the BitTorrent code does.  --KON ]
2007-04-06 15:18:49 +03:00
Kalle Olavi Niemitalo
1dfdb6e19b Revert 8bedf25b, "goto_url_hook takes 2 params not 1."
Revert 8bedf25bf8.  Different versions
of ELinks call the Python goto_url_hook with different arguments:

- goto_url_hook(current) in 0.11.0, 0.11.1, and 0.11.2.

- goto_url_hook(new, current) in 0.11.2.GIT since 2007-11-27, commit
  8bedf25bf8 which I'm now reverting.
  No released version of ELinks has used this variant.

- goto_url_hook(new) in 0.12.GIT since 2007-01-01, commit
  26473f72f5.  The hook can call
  elinks.current_url() if desired.

I think it will be less confusing to users if we drop the middle
variant and make the rest of the stable 0.11 branch call the hook in
the same way as 0.11.2 did.  The difference will then be only between
the 0.11 and 0.12 branches.
2007-04-06 14:30:00 +03:00
Kalle Olavi Niemitalo
defc67d020 Bug 880: Prevent SIGSEGV in init_python when -no-home is used.
Before this patch, init_python would crash trying to set up the
PYTHONPATH environment variable.  Now it omits the home directory
from the variable in that case.

[ Related to commit 78bd416dc0 in ELinks
  0.12.GIT but quite different internally.  --KON ]
2007-04-05 10:10:32 +03:00
Miciah Dashiel Butler Masters
0fe04536b3 SMJS: fix segfault on exit
Create and immediately destroy a context when initialising the SMJS
document scripting module, because SMJS crashes on exit if there has
been no context created since it started, which is the case if one does
not load any documents.

[ From commit d7a964efaf in ELinks
  0.12.GIT.  --KON ]
2007-04-05 00:16:15 +03:00
Miciah Dashiel Butler Masters
63de05a585 menu_handler: Don't call get_parent_ptr for redraw events
Only call get_parent_ptr for resize events so that the menu isn't moved
to the cursor position for normal redraw events.

Without this change, if ui.leds.enable and ui.clock.enable are 1 and
the user opens the tab menu, it first appears near the tab bar and
almost immediately jumps near the cursor.  With this change, the tab
menu stays near the tab bar.  However, if the user presses Ctrl+L,
then the menu still jumps; but that is less annoying than having it
jump on its own.

[ From commit 1a89589b13 in ELinks
  0.12.GIT.  --KON ]
2007-04-01 22:05:43 +03:00
Kalle Olavi Niemitalo
d0255cf7dd doc: cut-clipboard does not merely delete text from clipboard.
[ From commit 315f4e0342 in ELinks
  0.12.GIT.  This commit adds a string that perhaps won't be
  translated in time for the 0.11.3 release, but I think it is
  better to display a correct description in the wrong language
  than a misleading description in the right language.  --KON ]
2007-04-01 21:22:55 +03:00
Kalle Olavi Niemitalo
7e8020a36f "Do not show anymore" resets ui.success_msgbox, instead of toggling it.
Normally, the success msgbox is shown only if the ui.success_msgbox
option is set as 1, and clicking "Do not show anymore" would then
toggle the option to 0, and no more such msgboxes would appear.
However, if there already are two success msgboxes being displayed
(most likely in different terminals), then clicking "Do not show
anymore" in the first of them would reset the option to 0, but doing
the same in the second of them would toggle the option back to 1.

Rename toggle_success_msgbox to disable_success_msgbox, and make it
always reset the option to 0, regardless of the previous value.

[ From commit 7185e926e6 in ELinks
  0.12.GIT.  This I think does not deserve a NEWS entry.  --KON ]
2007-04-01 21:09:12 +03:00
Kalle Olavi Niemitalo
22d051925e do_move_bookmark: Update comment to match reality. 2007-04-01 14:59:28 +03:00
Laurent MONIN
a3fb7f097c Compilation fix: _GNU_SOURCE has to be defined on GNU platforms to get
strcasestr().

[ From commit 7585eedd2e in ELinks
  0.12.GIT.  --KON ]
2007-04-01 12:14:33 +03:00
Jonas Fonseca
a822daef26 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.

[ From commit 3ea73da7df in ELinks
  0.12.GIT.  --KON ]
2007-04-01 12:10:03 +03:00
Miciah Dashiel Butler Masters
94e153194c MIME: fix crash with empty File extensions menu
Delete the FREE_LIST flag from mi_no_ext so that free_menu_items doesn't
try to free static memory.

This fixes a crash reproducible by deleting every entry under Setup -> File
extensions, opening said menu, and then closing said menu.

[ From commit b41c7d4055 in ELinks
  0.12.GIT.  --KON ]
2007-04-01 12:03:03 +03:00
Miciah Dashiel Butler Masters
cf4bfd6b75 do_move_bookmarks: replace destb and desti parameters with insert_as_child flag
Simplify do_move_bookmarks (from a readability perspective) by replacing
the destb and desti parameters with a new insert_as_child flag. Inspired
by Kalle Olavi Niemitalo.

[ Backported from commit 32ec5d1db3 in
  ELinks 0.12.GIT.  This change is not required for fixing bug 760, but
  the bookmark code in ELinks 0.12.GIT has been tested more with the
  change than without it, so I think applying it is safest.  --KON ]
2007-04-01 11:58:40 +03:00
Miciah Dashiel Butler Masters
f287d5aa31 Bookmarks: Fix update after move
do_move_bookmark was only updating the selection in the bookmarks manager
window in which the Move button was pressed. Now all windows are updated.

This patch also prevents a crash when the first item that was displayed
in a box was the last child of a folder and was being moved (the comment
removed in this patch was incorrect in assuming that bm->box->next must
be valid because it neglected to account for non-root children).

This change required that I move the definition of struct
hierbox_dialog_list_item from src/bfu/hierbox.c to src/bfu/hierbox.h.

Thanks to Kalle Olavi Niemitalo for finding both the update problem
and the crash.

[ Backported from commit 6f98f5fd96 in
  ELinks 0.12.GIT.  --KON ]
2007-04-01 11:49:37 +03:00
Witold Filipczyk
a3862170ff Fix the memleak. Part II of the 927 bugfix.
[ From commit 27a66f59d9 in ELinks
  0.12.GIT.  --KON ]
2007-04-01 11:30:46 +03:00
Witold Filipczyk
7a56204271 The fix for the bug 927.
When tables were rendered first time html_format_part was called with
document==NULL. <meta http-equiv=Refresh.../> was inside a table,
so document was NULL. Second time the table knew its dimensions
and document was not NULL.

[ From commit e01785e462 in ELinks
  0.12.GIT.  --KON ]
2007-04-01 11:30:24 +03:00
Laurent MONIN
b918ab57de Let be more tolerant with buggy meta refresh. It should fix bug 767.
[ From commit 36a277540c in ELinks
  0.12.GIT.  --KON ]
2007-04-01 10:57:35 +03:00
Kalle Olavi Niemitalo
935f02c0f0 BFU: Fix infinite loops in menus that have only unselectable elements.
src/bfu/menu.c (scroll_menu): Let neither menu->selected nor pos
become -2.

src/bfu/menu.c (menu_mouse_handler): Call set_menu_selection directly
rather than via scroll_menu, as sel is already known to be selectable.
(Not required for fixing the bug.)

src/bfu/menu.c (menu_search_handler): Break infinite loops also if
menu->selected is -1 initially.

src/bfu/menu.c (menu_handler): Instead of tweaking menu->selected
directly, let scroll_menu do it.

[ From commit 0a8633d07e in ELinks
  0.12.GIT.  --KON ]
2007-04-01 00:33:45 +03:00
Kalle Olavi Niemitalo
220b0d770a BFU: Fix searching in menus past unselectable items.
The bug was that menu_search_handler gave scroll_menu an incorrect
count because it didn't know that scroll_menu skips unselectable
items.

[ From commit 9fa5ae374f in ELinks
  0.12.GIT.  --KON ]
2007-04-01 00:32:03 +03:00
Kalle Olavi Niemitalo
681f34d8d0 Bug 886: Set cookies_dirty if a cookie is edited via the manager.
If the appropriate option is set, this now causes the cookies to be
immediately saved as well.

[ From commit 3cd0fbe5f0 in ELinks
  0.12.GIT.  --KON ]
2007-04-01 00:16:36 +03:00
Kalle Olavi Niemitalo
0bdbb983b8 Bug 886: Update cookies_dirty after delete_cookie calls as appropriate.
[ From commit fad9c75cc6 in ELinks
  0.12.GIT.  --KON ]
2007-04-01 00:15:47 +03:00
Kalle Olavi Niemitalo
f311f3ea93 Bug 886: Postpone resaving the cookies until a bottom half.
[ From commit b79210ea1b in ELinks
  0.12.GIT.  --KON ]
2007-04-01 00:13:25 +03:00
Kalle Olavi Niemitalo
89f1e654c6 Bug 886: Document why delete_cookie does not set cookies_dirty.
[ From commit 8ecf105cd5 in ELinks
  0.12.GIT.  --KON ]
2007-04-01 00:11:26 +03:00
Miciah Dashiel Butler Masters
83663ac993 Re-use @fs in activate_link instead of introducing a new local variable
This optimisation is made possible by commit
4a9b80eea0.

[ From commit 896cdab771 in ELinks
  0.12.GIT.  --KON ]
2007-04-01 00:00:26 +03:00
Kalle Olavi Niemitalo
4a9b80eea0 Bug 908, activate_link: Set fs->state before the fs pointer becomes invalid.
[ From commit 15dce57bc9 in ELinks
  0.12.GIT.  --KON ]
2007-03-31 23:59:14 +03:00
Kalle Olavi Niemitalo
0003e4762c Bug 772: Recognize ESC [ Z as Shift-Tab, and bind it like Alt-Tab by default.
[ From commit b42f0ba153 in ELinks
  0.12.GIT.  I'll add a NEWS entry as a separate commit.  --KON ]
2007-03-31 23:05:53 +03:00
Laurent MONIN
fd83797cae HTTP DIGEST AUTH: fix wrong sizeof(), patch by Vitaly Lavrov (added to
AUTHORS). Close bug 769.

[ From commit c2ca89cab1 in ELinks
  0.12.GIT.  I'll add a NEWS entry as a separate commit.  --KON ]
2007-03-31 22:55:52 +03:00
Kalle Olavi Niemitalo
af82ab8af7 Advertise smb2.c to be included in ELinks 0.12.0. 2007-03-27 01:41:26 +03:00
Kalle Olavi Niemitalo
f135339a1a add_string_to_string: Don't fail if @from is empty.
Old versions of add_string_to_string returned the target string
unmodified if from->source pointed to a null character, which usually
meant that the source string was empty.  That was changed in commit
5e18576391f75ad84e04f9c8a30b93d08f0b92ab on 2004-11-03 so that
add_string_to_string instead returned NULL in that situation.  The
change seems to have been inadvertent.

I'm now reverting that change and also making add_string_to_string
check the emptiness of the source string based on the stored length
only, rather than on any null characters.  So the function can now
also be used with non-C strings containing embedded null characters.
Note that the previous version did not completely prevent embedded
null characters either, because it checked only the first character.

[ From commit 4a23d7fd82 in ELinks
  0.12.GIT.  --KON ]
2007-03-18 21:18:02 +02:00
Witold Filipczyk
fd70a5b352 get_attr_value: do not do trim_chars
trim_chars was called only in debug mode and the results of the get_attr_val
for value=" something " in debug mode differ from normal and fastmem mode.

[ From commit e347122e6d in ELinks
  0.12.GIT.  --KON ]
2007-03-18 13:50:34 +02:00
Witold Filipczyk
8104dc80cd accesskey: start iterating with next link.
Rotating between links with the same accesskey works.

[ Backported from commit d2970e57af
  in ELinks 0.12.GIT.  --KON ]
2007-03-18 13:22:42 +02:00
Witold Filipczyk
94ff057a6c Accesskey didn't work as it should.
[ Backported from commit 682ad62a97
  in ELinks 0.12.GIT.  --KON ]
2007-03-18 13:21:36 +02:00
Kalle Olavi Niemitalo
518cf082db add_html_to_string: If out of memory, roll back and return NULL.
[ Backported from commits 28645973e5
  and b7dddaa685 in ELinks 0.12.GIT.
  --KON ]
2007-03-18 12:38:19 +02:00
Kalle Olavi Niemitalo
1c3c19c91b ftp, add_file_cmd_to_str: Check errors from string functions.
Use goto for error handling.  Free all strings in the same place.

[ Bug 942; backported from commit c6b8fa7151
  in ELinks 0.12.GIT.  --KON ]
2007-03-18 12:31:29 +02:00
Kalle Olavi Niemitalo
465166a940 Reject CR and LF characters in FTP pathnames.
[ Bug 942; backported from commit adfde652b9
  in ELinks 0.12.GIT.  --KON ]
2007-03-18 12:29:11 +02:00
Witold Filipczyk
feb3f21b34 ftp: ftp didn't handle filenames with spaces.
[ Bug 942; backported from commit 3f4de99f16
  in ELinks 0.12.GIT.  I omitted the part of the patch that decodes
  FTP URLs for HTML TITLE, because I think it's an enhancement rather
  than a bug fix.  --KON ]
2007-03-18 12:28:06 +02:00
Kalle Olavi Niemitalo
2f4b3dae69 string_assert: First arg of elinks_internal is a format string.
[ Backported from commit a73d165fd7
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 14:02:17 +02:00
Kalle Olavi Niemitalo
0286a66c98 XBEL: Fix us-ascii charset lookup.
Previously, print_xml_entities did look up the charset, but did not
save the result anywhere and just used 0, leading to further lookups
in subsequent calls.  It worked by accident though, because the
codepage index of us-ascii currently is 0.

[ Backported from commit e325b748be
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 14:01:08 +02:00
Kalle Olavi Niemitalo
fe886d198d textarea_edit: Cast size_t fx_maxlength to match "%u".
[ Backported from commit 0dfb88c802
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 14:00:18 +02:00
Kalle Olavi Niemitalo
0b7097ca9f cgi: Avoid assertion failure when the POST data is empty.
[ Backported from commit 701e7e3e64
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 13:57:34 +02:00
Witold Filipczyk
daf5d88405 cgi: Fix the possible memleak and close pipes in case of error.
[ Backported from commit 035ce283c7
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 13:55:30 +02:00
Witold Filipczyk
a64dd281e9 POST method of CGI did not work. It works now.
[ Backported from commit eef7924ff1
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 13:50:09 +02:00
Kalle Olavi Niemitalo
8d9837a015 cgi: Ensure correct type of NULL pointer to variadic execl.
[ Backported from commit 4c636d74f1
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 13:48:36 +02:00
Witold Filipczyk
4a624fceb8 cgi: set_nonblocking_fd
[ Backported from commit 2828d587b2
  in ELinks 0.12.GIT.  --KON ]
2007-03-11 13:47:26 +02:00
Kalle Olavi Niemitalo
7fdad68e7e Bug 937, http_send_header: Initialize the entry pointer.
In ELinks 0.12.GIT, it was already initialized before the bug 937 fix.
2007-02-25 17:11:38 +02:00
Kalle Olavi Niemitalo
7c0027bf26 Bug 937, http_send_header: Don't send all headers to CONNECT proxy.
Backported from ELinks 0.12.GIT (4e4dddb4cc).
2007-02-25 15:17:03 +02:00
Kalle Olavi Niemitalo
1f65dd2802 Bug 919, mem_mmap_realloc: Don't overflow the buffer when shrinking it.
The bug was possible only #ifndef HAVE_MREMAP, thus not on Linux.

Backported from ELinks 0.12.GIT (4ae90c798c).
2007-01-02 20:43:58 +02:00
Jonas Fonseca
d18333075d Bug 899: Fix size handling in FTP directory listings
This fixes parse_ftp_number to use off_t instead of long to store its
(intermediate) result and return type. It also introduces an OFFT_MAX type
"limit" that is used for validating the size of the parsed number.

A test-case for was added in 37c9bf3f75 to
test-ftp-parser and the patch has been confirmed to fix the test-case by
adamg and me.  This closes bug 899, which is a duplicate of debian bug
403139.
2006-12-18 18:55:21 +01:00
Jonas Fonseca
a81e623492 Merge with git+ssh://pasky/srv/git/elinks#elinks-0.11 2006-12-04 21:59:49 +01:00
Jonas Fonseca
5e0dcf1aaf Bug 831: Make it possible to quote args given to -remote
This fixes the problem with URLs that contain commas and are passed to
ELinks using: -remote openURL(URL). Fixes bug 831.
2006-12-04 21:59:18 +01:00
Kalle Olavi Niemitalo
8751524424 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-12-04 21:58:33 +01:00
Jonas Fonseca
dbfb34f395 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-12-04 21:58:21 +01:00
Kalle Olavi Niemitalo
796791296a Bug 870: Don't panic if an SMJS property ID is unrecognized.
If ECMAScript code does obj[42], then the getProperty or setProperty
function of the JSClass of obj gets 42 as the property ID and must not
treat that as an internal error.

(Adapted from 7894e30ace in ELinks 0.12.GIT.)
2006-12-03 12:38:59 +02:00
Kalle Olavi Niemitalo
aac8f4582f Bug 846: {get,set}Property check JS_InstanceOf without asserting.
The getProperty and setProperty functions of a JSClass must not assume
that the obj parameter points to an instance of that class.  It might
instead point to another object that merely has an instance of the
class in its prototype chain.  Thus, do not assert that JS_InstanceOf
returns true there.  Instead, run the check even with CONFIG_FASTMEM,
and just return JS_FALSE if it fails.

(Adapted from aa410301f1 in ELinks 0.12.GIT.)
2006-12-03 12:30:41 +02:00
Kalle Olavi Niemitalo
5b9ea6a4ee Bug 868: check_timers: Don't keep pointers to other timers past timer->func. 2006-12-02 21:28:36 +02:00
Timo Lindfors
00ed4bf3ef Fix bug #741: "html comments shouldn't be evaluted inside STYLE elements" 2006-11-27 18:27:40 +01:00
Jonas Fonseca
e189a7e114 Make ELinks more BSD console friendly
Conditionally define keys, such as DEL, when compiling on a system having
the BSD console system headers.

A combination of the changes:
	791cab91e7
	cfbe41aa8a
	fae675316b
2006-11-27 18:18:06 +01:00
Eric Wald
c38e8dc40b Add support for forcing wrapping at the screen boundary
This patch modifies ELinks wrapping behavior slightly.

 * The wrap command now toggles line wrapping in HTML mode, as well as
   text mode.  Note that when the HTML view of a page is wrapped, its
   source view is unwrapped, and vice versa.
 * Tabs in text-mode lines are now handled correctly.
 * Wrapping a line that reaches exactly to the edge of the screen will
   no longer produce a blank line in text mode.
 * Text within extra-wide table cells is now wrapped to less than the
   screen width, to eliminate sideways scrolling.

The last point is only enabled by setting TABLE_LINE_PADDING to a
non-negative number, in the src/setup.h header file, because it is a
significant change of behavior from previous versions.
2006-11-27 18:10:18 +01:00
Miciah Dashiel Butler Masters
4b1425f762 Initially place cursor on the current listbox item
Introduce the macros before_widgets and foreach_widget_back. Use the
latter in update_all_widgets instead of foreach_widget so that the
widgets are printed in reverse order, which means that any listbox is
drawn last, which allows it to grab the cursor from the selected button
when the dialogue box is initialised or redrawn.

Requested by Kirk Reiser for great usability with screen readers.
2006-11-27 18:09:25 +01:00
witekfl
372d32ccec Add slash after host required by URI_HTTP_REFERRER_HOST 2006-11-27 18:05:41 +01:00
Laurent MONIN
734f964714 Fix segfaults caused by ruby scripting (gentoo bug #121247). Backported
from gentoo portage tree.
2006-11-27 18:03:49 +01:00
Laurent MONIN
bcabd8b795 Fix compilation under gcc 4.x. Backported from gentoo portage. 2006-11-27 18:03:49 +01:00
Jonas Fonseca
b0a0527c9f Describe the document.uri_passing option in more depth
Mention the *-external-command actions.
2006-11-27 17:53:41 +01:00
Miciah Dashiel Butler Masters
cd7ad685f7 refresh_view: drop unnecessary call to redraw_from_window
print_screen_status calls redraw_from_window, so there is no need to
call both.
2006-11-27 17:50:58 +01:00
Jonas Fonseca
9090b68bd6 FSP: Check and exit the file 'writer' process if writes to stdout fails
This ensures that the 'writer' process will remove itself when the
main ELinks process for some reason decides to shutdown the connection.
Before the 'writer' process would complete it's task taking up unnecessary
system resources.

This is mostly an issue when fetching big files. Therefore only file
fetching is fixed. FIXME added about also checking return codes for write
associated with directory listing.

Reported-by: zas
2006-11-27 17:46:51 +01:00
Laurent MONIN
135a79a3c3 Include <sys/types.h> and fix compilation on an old PPC/Debian system
It should be included via elinks.h but apparently some other system header
can prevent this somehow on some systems.

Reported-by: Phillip Pi <ant@zimage.com>
2006-11-27 17:38:00 +01:00
Jonas Fonseca
2c40cb003c Ignore test files 2006-11-27 17:36:29 +01:00
witekfl
8bedf25bf8 goto_url_hook takes 2 params not 1. Some dumbprefixes defined in hooks.py 2006-11-27 17:13:02 +01:00
witekfl
e1ae6a0cdf Added slash to base href when directory didn't end with '/' 2006-11-27 17:08:18 +01:00
witekfl
d580483c6b Compilation fix 2006-11-27 17:07:13 +01:00
Miciah Dashiel Butler Masters
8dabb246ae Use enum connection_state
Use enum connection_state instead of int in load_uri,
proxy_uri, get_proxy_worker, and get_proxy_uri. See commit
d18809522e. I hope that satisfies TCC.
2006-11-27 17:04:43 +01:00
witekfl
522ee24ab8 Compilation fixes 2006-11-27 17:03:34 +01:00
Jonas Fonseca
af7ce38639 BOOKMARKS: Fix XBEL calling add_bookmark() with NULL title
It didn't check that both title and title->text was non NULL. In either
case it now passes "No title" string to add_bookmark().

Reported by Neuromancer.

Tested with both:

	<bookmark href="empty://title"><title></title><bookmark>
	<bookmark href="no://title"></bookmark>
2006-11-27 16:56:12 +01:00
Kalle Olavi Niemitalo
67d6474684 Bug 846: Document the expected parents of form_elements_class instances.
This should have been in commit 92290b73a9.
The corresponding commit e76e047196 in the
REL_0_10 branch does include it.
2006-11-26 19:06:28 +02:00