vlc | branch: master | Francois Cartegnie <[email protected]> | Mon Jun  4 
14:09:15 2018 +0200| [55720954e56f85b5d6b33b371c053d3c7e276545] | committer: 
Francois Cartegnie

access: sftp: check port in known hosts

because port forwarding might be in use on server.
see example ssh2_exec.c

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55720954e56f85b5d6b33b371c053d3c7e276545
---

 modules/access/sftp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index 56d1281218..a86d44451c 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -314,12 +314,21 @@ static int Open( vlc_object_t* p_this )
 
     }
 
+#if LIBSSH2_VERSION_NUM >= 0x010206
+    int check = libssh2_knownhost_checkp( ssh_knownhosts, url.psz_host, i_port,
+                                         fingerprint, i_len,
+                                         LIBSSH2_KNOWNHOST_TYPE_PLAIN |
+                                         LIBSSH2_KNOWNHOST_KEYENC_RAW |
+                                         knownhost_fingerprint_algo,
+                                         &host );
+#else
     int check = libssh2_knownhost_check( ssh_knownhosts, url.psz_host,
                                          fingerprint, i_len,
                                          LIBSSH2_KNOWNHOST_TYPE_PLAIN |
                                          LIBSSH2_KNOWNHOST_KEYENC_RAW |
                                          knownhost_fingerprint_algo,
                                          &host );
+#endif
 
     libssh2_knownhost_free( ssh_knownhosts );
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to