Simon Tatham [Mon, 22 Jan 2001 17:17:26 +0000 (17:17 +0000)]
Jeremy Sawicki's fix for the multiple-conflicting-accelerators
problems: controls are now destroyed and recreated on a panel
switch. In addition, this patch also introduces a better means of
doing the group boxes.
Simon Tatham [Fri, 19 Jan 2001 10:10:37 +0000 (10:10 +0000)]
Experimental Rlogin support, thanks to Delian Delchev. Local flow
control is unsupported, and server-to-client comms may fail for want
of working TCP Urgent.
Simon Tatham [Wed, 17 Jan 2001 17:25:58 +0000 (17:25 +0000)]
The `wrapnext' variable now states whether we _would_ wrap next
character if we were wrapping, not whether we _will_ wrap next
character. Makes for saner behaviour with vertical-line cursor and
also when changing autowrap mode while on rightmost column. Does
entail small behavioural changes to backspace and destructive-
backspace when in rightmost column with Auto Wrap off, but I don't
think they should be catastrophic, or indeed that there's a well
defined Right Behaviour.
Simon Tatham [Wed, 17 Jan 2001 17:20:28 +0000 (17:20 +0000)]
Tidy up that latest checkin. PS_DOTTED is spelled PS_DOT and in any
case doesn't really cut it; we have to SetPixel every other one
manually because although PS_ALTERNATE exists it only works under
NT. Meanwhile, IDC_CURSTATIC was already used, for the cursor
_keys_. Duh.
Simon Tatham [Mon, 8 Jan 2001 13:57:45 +0000 (13:57 +0000)]
Ensure ssh specials (EOF and PING) don't occur except in connection
states where they're meaningful. In case Plink misses an EOF by
attempting to send it before reaching SSH_STATE_SESSION, it is
buffered and sent later. PINGs can be sent during any part of the
initialisation phase _except_ before deciding whether to use
protocol 1 or 2.
Simon Tatham [Sun, 7 Jan 2001 19:15:59 +0000 (19:15 +0000)]
Fix for spurious Space getting sent when alt_space and alt_only are
both set and you bring up the Sysmenu with an alt_space and dispatch
it with an alt_only. (The SYSKEYDOWN for alt_only is never received,
but we get the SYSKEYUP which PostMessages the space since it
expects to be triggering the _creation_ of a sysmenu. Solution: set
alt_state to 0 when an alt_space triggers a sysmenu, so that the
final SYSKEYUP will be seen as spurious, which it is. Perhaps we
could do this better.)
Simon Tatham [Tue, 12 Dec 2000 10:33:13 +0000 (10:33 +0000)]
Make memory management uniform: _everything_ now goes through the
smalloc() macros and thence to the safemalloc() functions in misc.c.
This should allow me to plug in a debugging allocator and track
memory leaks and segfaults and things.
Simon Tatham [Sat, 2 Dec 2000 12:48:15 +0000 (12:48 +0000)]
Improve SSH2 host key abstraction into a generic `signing key'
abstraction, so as to be able to re-use the same abstraction for
user authentication keys and probably in the SSH2 agent (when that
happens) as well.
Simon Tatham [Sat, 2 Dec 2000 11:43:25 +0000 (11:43 +0000)]
Fix bugtraq 1949: server could open an agent forwarding channel even
if agent forwarding had not been negotiated on, and more
particularly even if it had been deliberately disabled by the user.
Simon Tatham [Wed, 1 Nov 2000 19:54:46 +0000 (19:54 +0000)]
Move dprintf and the debug system out into misc.c, to centralise it.
Saves binary space and also allows redirection of debug statements
to a file `debug.log'.
Simon Tatham [Wed, 25 Oct 2000 14:29:28 +0000 (14:29 +0000)]
Impose a lower limit of 256 on key lengths. This is mostly because
the primegen() function doesn't work well with <100 bits, so RSA
keys need to be >=200 to be generated correctly, and I thought 256
was a nice round number beyond that just to be sure. Perhaps I
should also have a security warning on any key less than 768; or
perhaps I should let people shoot themselves in the feet if they
really want to.
Simon Tatham [Wed, 25 Oct 2000 14:20:47 +0000 (14:20 +0000)]
Gaaah, I might have known. Split combined app cursor / app keypad
disablement option into two options so the app cursor keys and app
keypad can be controlled separately. The Pedantic Software Award in
this case goes to the Midnight Commander for its egregious failure
to just use the terminal in Perfectly Normal mode.
Simon Tatham [Mon, 23 Oct 2000 15:18:37 +0000 (15:18 +0000)]
Fix a bug which was causing occasional failed-host-key-check
messages. Also left some diagnostics in, under #if 0, so that next
time this happens it'll be easier to debug.
Simon Tatham [Mon, 23 Oct 2000 12:20:53 +0000 (12:20 +0000)]
Plink and PSCP were failing to load the `Default Settings' options
when connecting to an arbitrary hostname. In particular, setting a
default user name didn't work. Now it does.
Simon Tatham [Mon, 23 Oct 2000 11:55:11 +0000 (11:55 +0000)]
Created a shiny new abstraction for the socket handling. Has many
advantages:
- protocol modules can call sk_write() without having to worry
about writes blocking, because blocking writes are handled in the
abstraction layer and retried later.
- `Lost connection while sending' is a thing of the past.
- <winsock.h> is no longer needed in most modules, because
"putty.h" doesn't have to declare `SOCKET' variables any more,
only the abstracted `Socket' type.
- select()-equivalent between multiple sockets will now be handled
sensibly, which opens the way for things like SSH port
forwarding.
Simon Tatham [Mon, 23 Oct 2000 10:32:37 +0000 (10:32 +0000)]
Created a shiny new abstraction for the socket handling. Has many
advantages:
- protocol modules can call sk_write() without having to worry
about writes blocking, because blocking writes are handled in the
abstraction layer and retried later.
- `Lost connection while sending' is a thing of the past.
- <winsock.h> is no longer needed in most modules, because
"putty.h" doesn't have to declare `SOCKET' variables any more,
only the abstracted `Socket' type.
- select()-equivalent between multiple sockets will now be handled
sensibly, which opens the way for things like SSH port
forwarding.
Simon Tatham [Sat, 21 Oct 2000 17:52:54 +0000 (17:52 +0000)]
Ooh. Actually, that vulnerability is further-reaching than I
thought. As well as the ".." attack in recursive copies, the name
sent by the client was also trusted in a single-file implicit-
destination copy such as "pscp host:foo .". (The result was ./foo,
where foo is what the server claimed the file was rather than what
the user asked for. I think it's not unreasonable that if the user
requests file `foo' from the host, he should get the result in a
file called `foo' no matter what the host thinks.)
Simon Tatham [Sat, 21 Oct 2000 17:36:44 +0000 (17:36 +0000)]
Fix a potential vulnerability in incoming `pscp -r'. The server
sends filenames of things in the directory being copied. A malicious
server could have sent, for example, "..\..\windows\system\foo.dll"
and overwritten something crucial. The filenames are now vetted to
ensure they don't contain slashes or backslashes.
Simon Tatham [Sat, 21 Oct 2000 16:30:58 +0000 (16:30 +0000)]
Three new configurable options:
- Robert de Bath's Compose key is now off by default and configurable on
- The ages-old controversy over whether ALT by itself should bring the
System menu up is now controllable by a config option
- You can now independently configure whether scrollback resets on a
keypress _and_ whether it resets on screen activity.