characters. This is for fast bailout if someone tries to do HTTPS to a
non-SSL webcit.
$Id$
+Tue Jan 24 11:07:04 EST 2006 ajc
+* client_getln() now fails if the client attempts to transmit non printable
+ characters. This is for fast bailout if someone tries to do HTTPS to a
+ non-SSL webcit.
+
Mon Jan 23 22:51:11 EST 2006 ajc
* Got a primitive version of the wiki system in place. Needs a lot of fine
tuning but it basically works.
retval = client_read(sock, &buf[i], 1);
if (retval != 1 || buf[i] == '\n' || i == (bufsiz-1))
break;
+ if ( (!isspace(buf[i])) && (!isprint(buf[i])) ) {
+ lprintf(2, "Non printable character recieved from client\n");
+ return(-1);
+ }
}
+
/** If we got a long line, discard characters until the newline. */
if (i == (bufsiz-1))
while (buf[i] != '\n' && retval == 1)