Compare commits

...
10 Commits
7 changed files with 42 additions and 42 deletions

No files matched your search

+14 -2
View File
@@ -1,10 +1,22 @@
2001-09-04 Robert James Kaes <rjkaes@flarenet.com>
* src/reqs.c (process_client_headers): Moved the skip header test
in front of the compare_header() function.
* src/ternary.c (ternary_search): Switched to doing case
insensitive searching.
* src/log.c (log_message): Thanks to NeilK for finding and fixing
a problem with the syslog code which can lead to a format string
attack.
2001-08-30 Robert James Kaes <rjkaes@flarenet.com>
* src/dnscache.c: Removed the insert_data() function and replaced
the "replace" logic in dns_insert() with a call to
ternary_replace(). This fixes the segmentation fault problem which
I introduced when I "tried" to fix the memory leak. Also changed
the LOCKing be around the entire dnscache() again since I still
the LOCKing to be around the entire dnscache() again since I still
need to work out how locking should be done when accessing the
ternary tree.
@@ -15,7 +27,7 @@
ternary_insert() and ternary_replace() which both call this
function with the right arguments.
* src/utils.c: Removed xstrstr() since it was only used in once
* src/utils.c: Removed xstrstr() since it was only used in one
place, and could be safely replaced with strstr. I can't even
remember why we had this function to begin with.
+13 -27
View File
@@ -1,3 +1,16 @@
Tuesday, September 4, 2001
--------------------------
I finally fixed a problem with the anonymous header code. The searches
are now all case insensitive. This fixes a problem where the spelling
of the HTTP headers could be different. It also helps with various
spellings of domain names. There is also a security fix for a format
string problem with the syslog feature. This problem doesn't affect
you if you use the log file instead.
-- Robert
Thursday, August 30, 2001
-------------------------
@@ -10,31 +23,4 @@ removed the xstrstr() function since strstr() will do what tinyproxy
needs. Removing code is _always_ a good idea. Less code, less chance
of bugs.
-- Robert
Wednesday, August 29, 2001
--------------------------
There has been a tonne of work done on tinyproxy since the beginning
of last week. I have been releasing minor-minor-minor point releases,
but the changes in this release constitute a minor-minor point
release. Please see the ChangeLog for detail descriptions of all the
changes, but here is a brief list.
The most serious fix is to the DNS caching system. There was a memory
leak in the system whenever a domain was already in the database, but
had expired. The new domain information was placed in the database,
but the old information wasn't freed.
The second change is in regard to the regular expression library. For
a while now tinyproxy has included it's own library (the GNU version)
in case the system did not have a working copy. Due to a bug in the
configure.in script the included REGEX library was being used even if
a working copy was detected. This was making tinyproxy larger than it
needed.
I would suggest that everyone upgrade to this version; especially
anyone who is still running 1.4.0 or below.
-- Robert
+2 -2
View File
@@ -1,4 +1,4 @@
dnl $Id: configure.in,v 1.24 2001-08-30 16:54:04 rjkaes Exp $
dnl $Id: configure.in,v 1.25 2001-09-04 16:52:04 rjkaes Exp $
dnl Devlopers, please strive to achieve this order:
dnl
@@ -19,7 +19,7 @@ AC_INIT()
AC_CANONICAL_SYSTEM
AC_DEFINE_UNQUOTED(TARGET_SYSTEM, "$target")
AM_INIT_AUTOMAKE(tinyproxy,1.4.2.1)
AM_INIT_AUTOMAKE(tinyproxy,1.4.2.2)
AM_CONFIG_HEADER(config.h)
dnl
+3 -2
View File
@@ -114,6 +114,7 @@ Allow 192.168.1.0/25
# If an Anonymous keyword is present, then anonymous proxying is enabled.
# The headers listed are allowed through, while all others are denied. If
# no Anonymous keyword is present, then all header are allowed through.
# You must include quotes around the headers.
#
#Anonymous Host
#Anonymous Authorization
#Anonymous "Host"
#Anonymous "Authorization"
+2 -2
View File
@@ -1,4 +1,4 @@
/* $Id: log.c,v 1.13 2001-08-29 03:59:12 rjkaes Exp $
/* $Id: log.c,v 1.14 2001-09-04 16:50:22 rjkaes Exp $
*
* Logs the various messages which tinyproxy produces to either a log file or
* the syslog daemon. Not much to it...
@@ -93,7 +93,7 @@ void log_message(short int level, char *fmt, ...)
vsyslog(level, fmt, args);
# else
vsnprintf(str, STRING_LENGTH, fmt, args);
syslog(level, str);
syslog(level, "%s", str);
# endif
} else {
#endif
+4 -4
View File
@@ -1,4 +1,4 @@
/* $Id: reqs.c,v 1.18 2001-08-30 16:51:10 rjkaes Exp $
/* $Id: reqs.c,v 1.19 2001-09-04 18:22:00 rjkaes Exp $
*
* This is where all the work in tinyproxy is actually done. Incoming
* connections have a new thread created for them. The thread then
@@ -424,9 +424,6 @@ static int process_client_headers(struct conn_s *connptr)
if (connptr->output_message)
continue;
if (is_anonymous_enabled() && compare_header(header) < 0)
continue;
/*
* Don't send certain headers.
*/
@@ -438,6 +435,9 @@ static int process_client_headers(struct conn_s *connptr)
if (i != (sizeof(skipheaders) / sizeof(char *)))
continue;
if (is_anonymous_enabled() && compare_header(header) < 0)
continue;
if (content_length == -1
&& strncasecmp(header, "content-length", 14) == 0) {
char *content_ptr = strchr(header, ':') + 1;
+4 -3
View File
@@ -1,4 +1,4 @@
/* $Id: ternary.c,v 1.6 2001-08-30 16:52:09 rjkaes Exp $
/* $Id: ternary.c,v 1.7 2001-09-04 17:53:41 rjkaes Exp $
*
* This module creates a Ternary Search Tree which can store both string
* keys, and arbitrary data for each key. It works similar to a hash, and
@@ -29,6 +29,7 @@
# include <sys/types.h>
#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -386,9 +387,9 @@ int ternary_search(TERNARY tno, const char *s, void **data)
p = trees[cur]->tree_root;
while (p) {
if (*s < p->splitchar)
if (toupper(*s) < toupper(p->splitchar))
p = p->lokid;
else if (*s == p->splitchar) {
else if (toupper(*s) == toupper(p->splitchar)) {
if (*s++ == 0) {
if (data)
*data = (void *)p->eqkid;