#define STDC_HEADERS 1
/* Most recent revision number in the version control system */
-#define VCS_REVISION "178"
+#define VCS_REVISION "179"
/* Version number of package */
#define VERSION "2.9"
dnl This is the one location where the authoritative version number is stored
AC_INIT(shellinabox, 2.9, markus@shellinabox.com)
-VCS_REVISION=178
+VCS_REVISION=179
AC_SUBST(VCS_REVISION)
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
[Most recent revision number in the version control system])
};
VT100.prototype.about = function() {
- alert("VT100 Terminal Emulator " + "2.9 (revision 178)" +
+ alert("VT100 Terminal Emulator " + "2.9 (revision 179)" +
"\nCopyright 2008-2009 by Markus Gutschke\n" +
"For more information check http://shellinabox.com");
};
return -1;
}
+ char *u;
+ check(u = strdup(url));
+ for (int i; u[i = strcspn(u, "\\\"'`${};() \r\n\t\v\f")]; ) {
+ static const char hex[] = "0123456789ABCDEF";
+ check(u = realloc(u, strlen(u) + 4));
+ memmove(u + i + 3, u + i + 1, strlen(u + i));
+ u[i + 2] = hex[ u[i] & 0xF];
+ u[i + 1] = hex[(u[i] >> 4) & 0xF];
+ u[i] = '%';
+ }
+
struct LaunchRequest *request;
- size_t len = sizeof(struct LaunchRequest) + strlen(url) + 1;
+ size_t len = sizeof(struct LaunchRequest) + strlen(u) + 1;
check(request = calloc(len, 1));
request->service = service;
request->width = session->width;
request->height = session->height;
strncat(request->peerName, httpGetPeerName(session->http),
sizeof(request->peerName) - 1);
- request->urlLength = strlen(url);
- memcpy(&request->url, url, request->urlLength);
+ request->urlLength = strlen(u);
+ memcpy(&request->url, u, request->urlLength);
+ free(u);
if (NOINTR(write(launcher, request, len)) != len) {
free(request);
return -1;
};
ShellInABox.prototype.about = function() {
- alert("Shell In A Box version " + "2.9 (revision 178)" +
+ alert("Shell In A Box version " + "2.9 (revision 179)" +
"\nCopyright 2008-2009 by Markus Gutschke\n" +
"For more information check http://shellinabox.com" +
(typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?
};
VT100.prototype.about = function() {
- alert("VT100 Terminal Emulator " + "2.9 (revision 178)" +
+ alert("VT100 Terminal Emulator " + "2.9 (revision 179)" +
"\nCopyright 2008-2009 by Markus Gutschke\n" +
"For more information check http://shellinabox.com");
};