Commit graph

417 commits

Author SHA1 Message Date
Jay Weisskopf
9cff326327 Use 2048-bit RSA keys for auto-generated certificates.
Security researchers have recommended moving away from 1024-bit
keys for a few years now.
2012-03-30 13:12:22 -07:00
Jay Weisskopf
85c3a03aec Assume a private key is RSA if the header does not specify a type.
Auto-generated certificates are RSA, but the header does not indicate
this (e.g. BEGIN PRIVATE KEY). Since the type is not specified,
the certificate was not being parsed correctly, and attempts to
connect over HTTPS failed and caused web browser errors.

Fixes "ERR_SSL_VERSION_OR_CIPHER_MISMATCH" in Chrome.
Fixes "ssl_error_no_cypher_overlap" in Firefox.
2012-03-30 13:12:22 -07:00
Anders Kaseorg
e20a7d2536 sslGenerateCertificate: Don't use the shell
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-03-30 13:12:22 -07:00
Anders Kaseorg
3115eb4995 sslSNICallback: Properly disallow invalid characters
Completely discard hostnames containing invalid characters, instead of
merely replacing the invalid characters with uninitialized memory.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-03-30 13:12:22 -07:00
Anders Kaseorg
db4137c890 Fix miscellaneous strncat buffer overflows
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-03-30 13:12:22 -07:00
Jay Weisskopf
2280b802c7 Fixed an error in the init script's status function. 2012-03-30 13:12:21 -07:00
Jay Weisskopf
8630c134a8 Check for null pointers from gethostbyname_r() to prevent seg faults. 2012-03-30 13:12:21 -07:00
Jay Weisskopf
53d34911a1 Removed "Lucida Console" font because bold is wider than normal. 2012-03-30 13:12:21 -07:00
Jay Weisskopf
65449410e7 Bold and underline SGR attributes now utilize CSS. 2012-03-30 13:12:21 -07:00
Jay Weisskopf
1cef2b0ef2 Removed color pair restrictions.
Sane color pairs are the application's responsibility. Widely-used
terminals such as PuTTY and gnome-terminal do not restrict colors.
2012-03-30 13:12:21 -07:00
Jay Weisskopf
3dae501f22 Removed config.h. It is auto-generated by the configure script. 2012-03-30 13:12:21 -07:00
Jay Weisskopf
13c1556a34 Changed the cursor color to match the default text color.
Red, the previous cursor color, should not be used during nominal
operation because most people subconsciously associate it with
"bad" or "problem". Additionally, this change makes it more
consistent with other widely-used terminal applications.
2012-03-30 13:12:21 -07:00
Jay Weisskopf
a0fac8a8db Write the OSC title to the window's title instead of the status bar.
Most modern browsers no longer have status bars. Additionally,
using the window's title makes it seem more like a conventional
terminal application.
2012-03-30 13:11:26 -07:00
Markus Gutschke
4ce287e217 Changed URL to point to the git repository 2012-03-29 01:13:25 -07:00
zodiac@gmail.com
1867125c3b Second try :-)
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@239 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-10-02 23:54:49 +00:00
zodiac@gmail.com
1a33fc8127 The server could sometimes end up listening for events even though it
was not really interested in them. This could result in inefficient I/O
behavior and most noticably it broke the ability to interrupt long running
output with CTRL-C.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@238 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-10-02 23:40:24 +00:00
zodiac@gmail.com
0ee4984e2c Fixed confusing error message when we fail to dynamically load PAM support.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@237 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-10-02 18:09:40 +00:00
zodiac@gmail.com
2c2389fe30 Some more research on the web suggests the Apple ships their operating
systems with an implementation of poll() that isn't completely POSIX
compliant. We now fall back on calling select() instead. That's not our
first choice, but it is presumably the best that MacOS X can do.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@236 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-10-02 01:54:29 +00:00
zodiac@gmail.com
0c63f96f95 pututxline() proves somewhat troublesome on MacOS X. Implement a few work-arounds to avoid some of these problems.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@235 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-30 21:51:46 +00:00
zodiac@gmail.com
dc6b0cbc85 Relax a check() that would trigger when using old-style (pre-Unix 98)
pseudo terminals.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@234 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-30 15:52:35 +00:00
zodiac@gmail.com
04607ee245 Minor clean ups. Came up with a feature test for the function signature used
by getgrouplist(). Added a few more UNUSED() macros.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@233 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-29 18:15:05 +00:00
zodiac@gmail.com
925c2385e7 Another iteration of changes intended to deal with MacOS X specific build
problems. Unfortunately, without access to a MacOS X build environment, some
of these have to be mere educated guesses...


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@232 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-29 16:46:51 +00:00
zodiac@gmail.com
301823036a Some changes to improve compatibility with MacOS X.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@231 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-29 06:28:58 +00:00
zodiac@gmail.com
81af285a8d In an attempt to reduce build dependencies, remove the requirement for
objcopy. Instead, we are now using "od" to generate C source code.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@230 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-29 02:19:23 +00:00
zodiac@gmail.com
412a209218 Added support for building with toolchains that don't support symbol aliasing.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@229 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-29 00:33:44 +00:00
zodiac@gmail.com
2ea15936f1 Removed a VLA that can trip up some compilers.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@228 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-27 16:56:43 +00:00
zodiac@gmail.com
fee8fa820e Set correct MIME type.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@227 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-12 16:16:06 +00:00
zodiac@gmail.com
87b16de7fe Set correct MIME type.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@226 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-12 16:14:44 +00:00
zodiac@gmail.com
e3e8843f3e Store the keyboard layout in its own HTML file.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@225 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-12 02:50:02 +00:00
zodiac@gmail.com
bdf1ba75bd Added --pidfile= option that can be used even if running in the foreground.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@223 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-11 19:32:30 +00:00
zodiac@gmail.com
61b40ad475 Make a best effort to close the PAM session properly. But if any failure is
reported, don't consider it fatal.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@222 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-06 17:32:17 +00:00
zodiac@gmail.com
2c262e1077 Added an optional on-screen keyboard. Must be activated by the user by selecting the option in the context-menu.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@221 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-04 17:50:11 +00:00
zodiac@gmail.com
13d0448fc6 Fix a pointer aliasing violation by explicitly breaking aliasing with a
call to memcpy().


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@220 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-03 19:17:11 +00:00
zodiac@gmail.com
c87777d04f Allow changing of font sizes in the user CSS.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@219 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-03 18:00:25 +00:00
zodiac@gmail.com
daffdc356a Fix some scaling related issues. This fix is thanks to some
excellent detective work by Jan <siev...@zedat.fu-berlin.de>.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@218 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-03 17:24:57 +00:00
zodiac@gmail.com
4db3ed8797 Force a zero pixel margin on the <body> tag. Without this change, ShellInABox
would occasionally think that it was in "embedded" mode, whenever the user
applied a scaling factor (e.g. by pressing CTRL-Minus).


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@217 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-09-02 23:42:42 +00:00
zodiac@gmail.com
e8c241583d Fixed a check() failure that was caused by incorrect handling of partially
processed buffers. I believe, this could only be triggered by clients that
enabled HTTP pipelining. That might explain why we haven't seen bug reports
any earlier.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@216 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-08-27 22:22:15 +00:00
zodiac@gmail.com
7289691555 Fixed lintian warnings. Tested on Debian Sid (x86-64)
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@215 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-08-24 22:29:11 +00:00
zodiac@gmail.com
ea18d9d970 Fixed some lintian warnings
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@214 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-08-24 22:26:41 +00:00
zodiac@gmail.com
7f59f4a7a6 Thanks to lotr44's excellent analysis of the problem, we now have
a fix for the problem with typing "!" on French keyboards.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@213 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-08-19 19:09:33 +00:00
zodiac@gmail.com
bdc877c53e Allow users to disable blinking cursor from context menu.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@212 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-08-06 22:15:35 +00:00
zodiac@gmail.com
21cfbec230 Add automatic notification about new releases.
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@211 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-07-16 16:20:52 +00:00
zodiac@gmail.com
445d3c66a6 Another attempt at coming up with Makefile rules that work for
both Linux and BSD.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@210 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-07-09 17:22:26 +00:00
zodiac@gmail.com
a5c8e032b7 Fixed assertion failure, when loading empty style files and using a more modern
version of glibc.

Fixed incorrect autoconf detection of isnan() support when using glibc and more
recent versions of gcc.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@209 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-07-09 16:10:21 +00:00
zodiac@gmail.com
c5d55118af Removed non-standard fields from updwtmpx() wrapper function. This should improve
compatibility with systems that implement updwtmp() but not updwtmpx().

Also, changed Makefile rules in an attempt to improve compatibility with BSD
make utilities.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@208 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-07-09 15:48:51 +00:00
zodiac@gmail.com
83621919cd Added support for systems that have utmpx.h, but don't implement updwtmpx().
git-svn-id: https://shellinabox.googlecode.com/svn/trunk@207 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-07-08 17:54:15 +00:00
zodiac@gmail.com
d1df9b6441 Fixed a NULL pointer dereference that can occur when hostnames
do not resolve. Thanks to <vmagerya> for pointing out this problem.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@206 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-07-02 19:00:33 +00:00
zodiac@gmail.com
00de1d4a19 Add -lm to the linker flags so that we always pick up isnan(), even when
compiling with runtime libraries other than glibc.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@205 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-04-01 19:16:56 +00:00
zodiac@gmail.com
775592791d Thanks to some more testing and additional information provided by Jan Jaeger,
we now have a much cleaner solution for building ShellInABox on OpenWRT.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@204 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-03-31 16:07:06 +00:00
zodiac@gmail.com
2ea8e5cc77 OpenWRT builds with a toolchain that doesn't set correct entries in the ELF
headers, giving us no way to auto-detect the architecture. We have to
hard-code the flags that we pass to objcopy. Unfortunately, we have to do
this for all MIPS targets. This could conceivably break building the code
on other MIPS targets. If that happens, we'll deal with it at that time.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@203 0da03de8-d603-11dd-86c2-0f8696b7b6f9
2010-03-30 17:16:49 +00:00