Merge branch 'master' of ssh://git.privoxy.org:23/git/privoxy
authorLee <ler762@users.sourceforge.net>
Sat, 16 Nov 2019 16:29:38 +0000 (11:29 -0500)
committerLee <ler762@users.sourceforge.net>
Sat, 16 Nov 2019 16:29:38 +0000 (11:29 -0500)
configure.in
doc/source/p-config.sgml
loaders.c
project.h
ssl.c
urlmatch.c

index 8739535..a8839c2 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl
-dnl Written by and Copyright (C) 2001-2018 the
+dnl Written by and Copyright (C) 2001-2019 the
 dnl Privoxy team. https://www.privoxy.org/
 dnl
 dnl Based on the Internet Junkbuster originally written
index 9bd21eb..2acf7fe 100644 (file)
@@ -3679,7 +3679,7 @@ forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t</title>
     # Define a couple of tags, the described effect requires action sections
     # that are enabled based on CLIENT-TAG patterns.
     client-specific-tag circumvent-blocks Overrule blocks but do not affect other actions
-    disable-content-filters Disable content-filters but do not affect other actions
+    client-specific-tag disable-content-filters Disable content-filters but do not affect other actions
 </screen>
   </listitem>
  </varlistentry>
index 65aba0a..1edf427 100644 (file)
--- a/loaders.c
+++ b/loaders.c
@@ -998,6 +998,8 @@ void unload_forward_spec(struct forward_spec *fwd)
    free_pattern_spec(fwd->url);
    freez(fwd->gateway_host);
    freez(fwd->forward_host);
+   freez(fwd->auth_username);
+   freez(fwd->auth_password);
    free(fwd);
 
    return;
index 20f693a..7cd6e50 100644 (file)
--- a/project.h
+++ b/project.h
@@ -981,7 +981,7 @@ struct reusable_connection
  * Maximum number of actions/filter files.  This limit is arbitrary - it's just used
  * to size an array.
  */
-#define MAX_AF_FILES 30
+#define MAX_AF_FILES 100
 
 /**
  * Maximum number of sockets to listen to.  This limit is arbitrary - it's just used
diff --git a/ssl.c b/ssl.c
index 0a45564..4585ce1 100644 (file)
--- a/ssl.c
+++ b/ssl.c
@@ -884,6 +884,7 @@ static void free_server_ssl_structures(struct client_state *csp)
 
 
 /*********************************************************************
+ *
  * Function    :  close_client_and_server_ssl_connections
  *
  * Description :  Checks if client or server should use secured
@@ -910,6 +911,7 @@ extern void close_client_and_server_ssl_connections(struct client_state *csp)
 /*====================== Certificates ======================*/
 
 /*********************************************************************
+ *
  * Function    :  write_certificate
  *
  * Description :  Writes certificate into file.
@@ -976,6 +978,7 @@ static int write_certificate(mbedtls_x509write_cert *crt, const char *output_fil
 
 
 /*********************************************************************
+ *
  * Function    :  write_private_key
  *
  * Description :  Writes private key into file and copies saved
@@ -1062,6 +1065,7 @@ exit:
 
 
 /*********************************************************************
+ *
  * Function    :  generate_key
  *
  * Description : Tests if private key for host saved in csp already
@@ -1920,19 +1924,19 @@ static int file_exists(const char *path)
 
 
 /*********************************************************************
-*
-* Function    :  host_to_hash
-*
-* Description :  Creates MD5 hash from host name. Host name is loaded
-*                from structure csp and saved again into it.
-*
-* Parameters  :
-*          1  :  csp = Current client state (buffers, headers, etc...)
-*
-* Returns     :  1 => Error while creating hash
-*                0 => Hash created successfully
-*
-*********************************************************************/
+ *
+ * Function    :  host_to_hash
+ *
+ * Description :  Creates MD5 hash from host name. Host name is loaded
+ *                from structure csp and saved again into it.
+ *
+ * Parameters  :
+ *          1  :  csp = Current client state (buffers, headers, etc...)
+ *
+ * Returns     :  1 => Error while creating hash
+ *                0 => Hash created successfully
+ *
+ *********************************************************************/
 static int host_to_hash(struct client_state * csp)
 {
    int ret = 0;
index f1742c8..124cc6e 100644 (file)
@@ -1440,20 +1440,23 @@ jb_err parse_forwarder_address(char *address, char **hostname, int *port,
                                char **username, char **password)
 {
    char *p;
-   *hostname = strdup_or_die(address);
+   char *tmp;
+
+   tmp = *hostname = strdup_or_die(address);
 
    /* Parse username and password */
    if (username && password && (NULL != (p = strchr(*hostname, '@'))))
    {
       *p++ = '\0';
-      *username = *hostname;
-      *hostname = p;
+      *username = strdup_or_die(*hostname);
+      *hostname = strdup_or_die(p);
 
       if (NULL != (p = strchr(*username, ':')))
       {
          *p++ = '\0';
          *password = strdup_or_die(p);
       }
+      freez(tmp);
    }
 
    /* Parse hostname and port */