Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b09d88a75 | ||
|
|
05cc60042e | ||
|
|
11cbe6cb5b | ||
|
|
c937858ec1 | ||
|
|
667b9d5d53 | ||
|
|
0094d2755b | ||
|
|
b095c7a84d | ||
|
|
45a021a18b | ||
|
|
aac5f60602 | ||
|
|
2857b4be36 |
No files matched your search
@@ -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>
|
2001-08-30 Robert James Kaes <rjkaes@flarenet.com>
|
||||||
|
|
||||||
* src/dnscache.c: Removed the insert_data() function and replaced
|
* src/dnscache.c: Removed the insert_data() function and replaced
|
||||||
the "replace" logic in dns_insert() with a call to
|
the "replace" logic in dns_insert() with a call to
|
||||||
ternary_replace(). This fixes the segmentation fault problem which
|
ternary_replace(). This fixes the segmentation fault problem which
|
||||||
I introduced when I "tried" to fix the memory leak. Also changed
|
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
|
need to work out how locking should be done when accessing the
|
||||||
ternary tree.
|
ternary tree.
|
||||||
|
|
||||||
@@ -15,7 +27,7 @@
|
|||||||
ternary_insert() and ternary_replace() which both call this
|
ternary_insert() and ternary_replace() which both call this
|
||||||
function with the right arguments.
|
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
|
place, and could be safely replaced with strstr. I can't even
|
||||||
remember why we had this function to begin with.
|
remember why we had this function to begin with.
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
Thursday, August 30, 2001
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
@@ -11,30 +24,3 @@ needs. Removing code is _always_ a good idea. Less code, less chance
|
|||||||
of bugs.
|
of bugs.
|
||||||
|
|
||||||
-- Robert
|
-- 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
@@ -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 Devlopers, please strive to achieve this order:
|
||||||
dnl
|
dnl
|
||||||
@@ -19,7 +19,7 @@ AC_INIT()
|
|||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
AC_DEFINE_UNQUOTED(TARGET_SYSTEM, "$target")
|
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)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
|
|||||||
+3
-2
@@ -114,6 +114,7 @@ Allow 192.168.1.0/25
|
|||||||
# If an Anonymous keyword is present, then anonymous proxying is enabled.
|
# If an Anonymous keyword is present, then anonymous proxying is enabled.
|
||||||
# The headers listed are allowed through, while all others are denied. If
|
# The headers listed are allowed through, while all others are denied. If
|
||||||
# no Anonymous keyword is present, then all header are allowed through.
|
# no Anonymous keyword is present, then all header are allowed through.
|
||||||
|
# You must include quotes around the headers.
|
||||||
#
|
#
|
||||||
#Anonymous Host
|
#Anonymous "Host"
|
||||||
#Anonymous Authorization
|
#Anonymous "Authorization"
|
||||||
@@ -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
|
* Logs the various messages which tinyproxy produces to either a log file or
|
||||||
* the syslog daemon. Not much to it...
|
* the syslog daemon. Not much to it...
|
||||||
@@ -93,7 +93,7 @@ void log_message(short int level, char *fmt, ...)
|
|||||||
vsyslog(level, fmt, args);
|
vsyslog(level, fmt, args);
|
||||||
# else
|
# else
|
||||||
vsnprintf(str, STRING_LENGTH, fmt, args);
|
vsnprintf(str, STRING_LENGTH, fmt, args);
|
||||||
syslog(level, str);
|
syslog(level, "%s", str);
|
||||||
# endif
|
# endif
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+4
-4
@@ -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
|
* This is where all the work in tinyproxy is actually done. Incoming
|
||||||
* connections have a new thread created for them. The thread then
|
* 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)
|
if (connptr->output_message)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (is_anonymous_enabled() && compare_header(header) < 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't send certain headers.
|
* Don't send certain headers.
|
||||||
*/
|
*/
|
||||||
@@ -438,6 +435,9 @@ static int process_client_headers(struct conn_s *connptr)
|
|||||||
if (i != (sizeof(skipheaders) / sizeof(char *)))
|
if (i != (sizeof(skipheaders) / sizeof(char *)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (is_anonymous_enabled() && compare_header(header) < 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (content_length == -1
|
if (content_length == -1
|
||||||
&& strncasecmp(header, "content-length", 14) == 0) {
|
&& strncasecmp(header, "content-length", 14) == 0) {
|
||||||
char *content_ptr = strchr(header, ':') + 1;
|
char *content_ptr = strchr(header, ':') + 1;
|
||||||
|
|||||||
+4
-3
@@ -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
|
* 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
|
* keys, and arbitrary data for each key. It works similar to a hash, and
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -386,9 +387,9 @@ int ternary_search(TERNARY tno, const char *s, void **data)
|
|||||||
p = trees[cur]->tree_root;
|
p = trees[cur]->tree_root;
|
||||||
|
|
||||||
while (p) {
|
while (p) {
|
||||||
if (*s < p->splitchar)
|
if (toupper(*s) < toupper(p->splitchar))
|
||||||
p = p->lokid;
|
p = p->lokid;
|
||||||
else if (*s == p->splitchar) {
|
else if (toupper(*s) == toupper(p->splitchar)) {
|
||||||
if (*s++ == 0) {
|
if (*s++ == 0) {
|
||||||
if (data)
|
if (data)
|
||||||
*data = (void *)p->eqkid;
|
*data = (void *)p->eqkid;
|
||||||
|
|||||||
Reference in new issue
Block a user