]> granicus.if.org Git - curl/commitdiff
libcurl: Exclude SMB from the protocol redirect
authorSteve Holme <steve_holme@hotmail.com>
Sun, 30 Nov 2014 20:56:01 +0000 (20:56 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 30 Nov 2014 20:42:05 +0000 (20:42 +0000)
As local files could be accessed through \\localhost\c$.

lib/url.c

index 0a3150e25da422bb87716ee99d6d7bc4b8c6fb71..d8703921fdcc995d7a74238475450e3b8660db3e 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -561,8 +561,9 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
      define since we internally only use the lower 16 bits for the passed
      in bitmask to not conflict with the private bits */
   set->allowed_protocols = CURLPROTO_ALL;
-  set->redir_protocols =
-    CURLPROTO_ALL & ~(CURLPROTO_FILE|CURLPROTO_SCP); /* not FILE or SCP */
+  set->redir_protocols = CURLPROTO_ALL &  /* All except FILE, SCP and SMB */
+                          ~(CURLPROTO_FILE | CURLPROTO_SCP | CURLPROTO_SMB |
+                            CURLPROTO_SMBS);
 
 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
   /*