mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
r8850@totoro: nickm | 2006-10-02 17:21:11 -0400
Make TrackExitHosts case-insensitive, and fix the behavior of .suffix TrackExitHosts items to avoid matching in the middle of an address. (Resolves an XXXX) svn:r8579
This commit is contained in:
parent
bff83b666c
commit
4de9f45d6f
@ -106,6 +106,8 @@ Changes in version 0.1.2.2-alpha - 2006-10-??
|
||||
- Make eventdns give strings for DNS errors, not just error numbers.
|
||||
- Be prepared in case we ever have a network with more than 2GB per
|
||||
second total advertised capacity.
|
||||
- Make TrackExitHosts case-insensitive, and fix the behavior of .suffix
|
||||
TrackExitHosts items to avoid matching in the middle of an address.
|
||||
|
||||
o Documentation
|
||||
- Documented (and renamed) ServerDNSSearchDomains and
|
||||
|
@ -1120,14 +1120,13 @@ consider_recording_trackhost(edge_connection_t *conn, origin_circuit_t *circ)
|
||||
|
||||
SMARTLIST_FOREACH(options->TrackHostExits, const char *, cp, {
|
||||
if (cp[0] == '.') { /* match end */
|
||||
/* XXX strstr is probably really bad here. */
|
||||
if ((str = strstr(conn->socks_request->address, &cp[1]))) {
|
||||
if (!strcasecmpend(conn->socks_request->address, cp)) {
|
||||
if (str == conn->socks_request->address
|
||||
|| strcmp(str, &cp[1]) == 0) {
|
||||
found_needle = 1;
|
||||
}
|
||||
}
|
||||
} else if (strcmp(cp, conn->socks_request->address) == 0) {
|
||||
} else if (strcasecmp(cp, conn->socks_request->address) == 0) {
|
||||
found_needle = 1;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user