Commit e8fd871d authored by Roger Dingledine's avatar Roger Dingledine
Browse files

Stop being printist: just because our local platform doesn't

consider an alleged destination to be printable doesn't mean
nobody in the world will want to use it.


svn:r6167
parent 13cf54b9
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -1003,13 +1003,6 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, int log_sockstype)
          req->address[len] = 0;
          req->port = ntohs(get_uint16(buf->cur+5+len));
          buf_remove_from_front(buf, 5+len+2);
          if (!tor_strisprint(req->address) || strchr(req->address,'\"')) {
            log_warn(LD_PROTOCOL,
                     "Your application (using socks5 on port %d) gave Tor "
                     "a malformed hostname: %s. Rejecting the connection.",
                     req->port, escaped(req->address));
            return -1;
          }

          if (log_sockstype)
            log_notice(LD_APP,
@@ -1105,13 +1098,6 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req, int log_sockstype)
      log_debug(LD_APP,"socks4: Everything is here. Success.");
      strlcpy(req->address, startaddr ? startaddr : tmpbuf,
              sizeof(req->address));
      if (!tor_strisprint(req->address) || strchr(req->address,'\"')) {
        log_warn(LD_PROTOCOL,
                 "Your application (using socks4 on port %d) gave Tor "
                 "a malformed hostname: %s. Rejecting the connection.",
                 req->port, escaped(req->address));
        return -1;
      }
      /* next points to the final \0 on inbuf */
      buf_remove_from_front(buf, next-buf->cur+1);
      return 1;
+0 −6
Original line number Diff line number Diff line
@@ -1533,12 +1533,6 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ)
    tor_free(address);
    return 0;
  }
  if (!tor_strisprint(address)) {
    log_warn(LD_PROTOCOL,"Non-printing characters in address %s in relay "
             "begin cell. Dropping.", escaped(address));
    tor_free(address);
    return 0;
  }

  log_debug(LD_EXIT,"Creating new exit connection.");
  n_stream = connection_new(CONN_TYPE_EXIT);