Граф коммитов

25 Коммитов

Автор SHA1 Сообщение Дата
Simon Tatham 81a11efdaf Correct an inequality sign causing the bounds check in Windows
palette_set() to be bogus. Fortunately, this isn't exploitable through
the terminal emulator, because the palette escape sequence parser
contains its own bounds check before even calling palette_set().

While I'm at it, fix the same goof in the OS X version! That port is
more or less abandoned, but that's no excuse for leaving obviously
wrong code lying around.

[originally from svn r9965]
2013-07-22 07:12:26 +00:00
Simon Tatham acf38797eb Add a nonfatal() function everywhere, to be used for reporting things
that the user really ought to know but that are not actually fatal to
continued operation of PuTTY or a single network connection.

[originally from svn r9932]
2013-07-19 17:44:28 +00:00
Simon Tatham bc6e0952ef Introduce a third setting for the 'bold as colour' mode, which lets
you both brighten the colour _and_ bold the font at the same time.
(Fixes 'bold-font-colour' and Debian #193352.)

[originally from svn r9559]
2012-06-09 15:09:22 +00:00
Simon Tatham a1f3b7a358 Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.

User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).

One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.

[originally from svn r9214]
2011-07-14 18:52:21 +00:00
Simon Tatham 4d77b65677 Centralise generation of the control sequences for arrow keys into a
function in terminal.c, and replace the cloned-and-hacked handling
code in all our front ends with calls to that.

This was intended for code cleanliness, but a side effect is to make
the GTK arrow-key handling support disabling of application cursor
key mode in the Features panel. Previously that checkbox was
accidentally ignored, and nobody seems to have noticed before!

[originally from svn r8896]
2010-03-06 15:50:26 +00:00
Jacob Nevins 07a876ce1e r8305 made platform_x11_best_transport[] obsolete, but there still seem to be a
few instances around; expunge them.

[originally from svn r8382]
[r8305 == ca6fc3a4da]
2009-01-04 23:36:24 +00:00
Jacob Nevins 46c00b0f38 Rationalise access to, and content of, backends[] array.
Should be no significant change in behaviour.
(Well, entering usernames containing commas on Plink's command line will be
a little harder now.)

[originally from svn r7628]
2007-06-30 21:56:44 +00:00
Simon Tatham 4d51d0d380 Bring the OS X front end up to date with recent changes to the main
code base.

[originally from svn r7296]
2007-02-18 15:59:38 +00:00
Simon Tatham 34f747421d Support for Windows PuTTY connecting straight to a local serial port
in place of making a network connection. This has involved a couple
of minor infrastructure changes:
 - New dlg_label_change() function in the dialog.h interface, which
   alters the label on a control. Only used, at present, to switch
   the Host Name and Port boxes into Serial Line and Speed, which
   means that any platform not implementing serial connections (i.e.
   currently all but Windows) does not need to actually do anything
   in this function. Yet.
 - New small piece of infrastructure: cfg_launchable() determines
   whether a Config structure describes a session ready to be
   launched. This was previously determined by seeing if it had a
   non-empty host name, but it has to check the serial line as well
   so there's a centralised function for it. I haven't gone through
   all front ends and arranged for this function to be used
   everywhere it needs to be; so far I've only checked Windows.
 - Similarly, cfg_dest() returns the destination of a connection
   (host name or serial line) in a text format suitable for putting
   into messages such as `Unable to connect to %s'.

[originally from svn r6815]
2006-08-28 10:35:12 +00:00
Jacob Nevins 6c14aa215f Typo in r6555 spotted by Daniel Meidlinger.
[originally from svn r6558]
[r6555 == d526e3bb33]
2006-02-14 13:14:08 +00:00
Owen Dunn d526e3bb33 Preserve more attributes of text copied as RTF. Thanks to Stephen Balousek.
[originally from svn r6555]
2006-02-13 22:18:17 +00:00
Simon Tatham 0a4b6612fb A few small changes to make the PuTTY source base more usable as a
basis for other terminal-involving applications: a stub
implementation of the printing interface, an additional function in
notiming.c, and also I've renamed the front-end function beep() to
do_beep() so as not to clash with beep() in lib[n]curses.

[originally from svn r6479]
2005-12-09 20:04:19 +00:00
Jacob Nevins 8719f92c14 Revamp SSH authentication code so that user interaction is more
abstracted out; replace loops structured around a single interaction
per loop with less tortuous code (fixes: `ki-multiprompt-crash',
`ssh1-bad-passphrase-crash'; makes `ssh2-password-expiry' and
`proxy-password-prompt' easier).

The new interaction abstraction has a lot of fields that are unused in
the current code (things like window captions); this is groundwork for
`gui-auth'. However, ssh.c still writes directly to stderr; that may
want to be fixed.

In the GUI apps, user interaction is moved to terminal.c. This should
make it easier to fix things like UTF-8 username entry, although I
haven't attempted to do so. Also, control character filtering can be
tailored to be appropriate for individual front-ends; so far I don't
promise anything other than not having made it any worse.

I've tried to test this fairly exhaustively (although Mac stuff is
untested, as usual). It all seems to basically work, but I bet there
are new bugs. (One I know about is that you can no longer make the
PuTTY window go away with a ^D at the password prompt; this should be
fixed.)

[originally from svn r6437]
[this svn revision also touched putty-wishlist]
2005-10-30 20:24:09 +00:00
Ben Harris 9d31462c52 Fix 256-colours-match-xterm, based on 256colres.pl from xterm-205.
Largely untested -- may not even compile on Windows.

[originally from svn r6393]
2005-10-13 21:56:43 +00:00
Jacob Nevins fb581ac625 First crack at `terminal-modes' in SSH. PuTTY now sends ERASE by default,
Unix Plink sends everything sensible it can find, and it's fully configurable
from the GUI.

I'm not entirely sure about the precise set of modes that Unix Plink should
look at; informed tweaks are welcome.

Also the Mac bits are guesses (but trivial).

[originally from svn r5653]
[this svn revision also touched putty-wishlist]
2005-04-21 13:57:08 +00:00
Jacob Nevins 52a17ab04a If a new session was saved from Change Settings, a side-effect on Windows was
that the global `sesslist' got out of sync with the saved-sessions submenu,
causing the latter to launch the wrong sessions.

Also, Change Settings wasn't getting a fresh session list, so if the set of
sessions had changed since session startup it wouldn't reflect that (at least
until a session was saved). Fixed (on all platforms).

Therefore, since the global sesslist didn't seem to be useful, I've got rid
of it; config.c creates one as needed, as do the frontends. (Not tried
compiling Mac changes.)

Also, we now build the saved-sessions submenu on demand on Windows and Unix.
(This should probably also be done on the Mac.)

[originally from svn r5609]
2005-04-07 01:36:28 +00:00
Simon Tatham cbab60a830 Beef up the `unfinished and experimental' warnings for the two Mac
ports, mentioning in particular that even if you downloaded a
_release_ source archive these particular ports are not considered
to be of release quality.

[originally from svn r5583]
2005-03-31 12:25:48 +00:00
Simon Tatham a1f0e69fe4 Thanks to D H Becker for sending in an icon. I'd have liked to have
written a script which would generate the various graphical
components of the PuTTY icon suite at any given resolution and then
used that to generate the OS X icon as well as all the others, but I
can always do that later; this'll do for now.

[originally from svn r5487]
2005-03-10 20:11:27 +00:00
Simon Tatham ce802e55dd Fix segfault on forcible window closure.
[originally from svn r5402]
2005-02-26 15:13:13 +00:00
Simon Tatham fe8114d90b Sort out close-on-exit, connection_fatal(), fatalbox(), and
[SessionWindow dealloc] (which was required in order to avoid
segfaulting when a redraw timer fired for a closed session window!).

[originally from svn r5400]
2005-02-26 13:37:07 +00:00
Simon Tatham f73fcb0424 Add asynchronous callback capability to the askappend() alert box.
This was harder than verify_ssh_host_key() and askalg() put
together, because:
 (a) askappend() can be called at any time, since it's a side effect
     of data-logging functions. Therefore there can be an unfinished
     askappend() alert at any time, and hence the OS X front end has
     to be prepared to _queue_ other alerts which occur during that
     time.
 (b) logging.c has to do something with data that comes in while
     it's waiting for an answer to askappend(). It buffers it until
     it knows what the user wants done with it. This involved
     something of a reorganisation of logging.c.

[originally from svn r5344]
2005-02-18 18:33:31 +00:00
Simon Tatham fceaa2e4a7 Ahem. Actually _checking_ that asynchronous askalg() worked would
have been helpful. Since async verify_ssh_host_key() worked, I
didn't think anything else could go wrong. How wrong I was.

[originally from svn r5331]
2005-02-17 18:56:37 +00:00
Simon Tatham 8574822b9b Revamp interface to verify_ssh_host_key() and askalg(). Each of them
now returns an integer: 0 means cancel the SSH connection and 1
means continue with it. Additionally, they can return -1, which
means `front end has set an asynchronous alert box in motion, please
wait to be called back with the result', and each one is passed a
callback function pointer and context for this purpose.

I have not yet done the same to askappend() yet, because it will
take a certain amount of reorganisation of logging.c.

Importantly, this checkin means the host key dialog box now works on
OS X.

[originally from svn r5330]
2005-02-17 18:34:24 +00:00
Simon Tatham c3857f88f7 Oops! Didn't mean to check in the OS X Makefile; that is of course
built by mkfiles.pl just like all the rest. Well spotted, Jacob.

[originally from svn r5316]
2005-02-16 09:01:45 +00:00
Simon Tatham 46bfde32e8 Initial checkin of a native Mac OS X port, sharing most of its code
with the Unix port and layering a Cocoa GUI on top. The basics all
work: there's a configuration panel and a terminal window, the
timing interface works and the select interface functions. The same
application can run both SSH (or other network) connections and
local pty sessions, and multiple sessions in the same process are
fully supported.

However, it's horribly unfinished in a wide variety of other ways;
anyone interested is invited to read README.OSX and wince at the
length and content of its `unfinished' list.

[originally from svn r5308]
2005-02-15 21:45:50 +00:00