summaryrefslogtreecommitdiff
path: root/Bugs.txt
blob: 2e233548d9882dc7889e9682b8e22753b1b9351a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
When manually compiling FreeFileSync, you should also fix the following bugs in its library dependencies.
FreeFileSync generally uses the latest library versions and works with upstream to get the bugs fixed
that affect FreeFileSync. Therefore it is NOT RECOMMENDED TO COMPILE AGAINST OLDER library versions than
the ones mentioned below. The remaining issues that are yet to be fixed are listed in the following:


----------------
| libcurl 7.72 |
----------------
__________________________________________________________________________________________________________
/lib/ftp.c
https://github.com/curl/curl/issues/1455

+	static bool is_routable_ip_v4(unsigned int ip[4])
+	{
+		if (ip[0] == 127 || //127.0.0.0/8 (localhost)
+			ip[0] == 10  || //10.0.0.0/8 (private)
+			(ip[0] == 192 && ip[1] == 168) ||  //192.168.0.0/16 (private)
+			(ip[0] == 169 && ip[1] == 254) ||  //169.254.0.0/16 (link-local)
+			(ip[0] == 172 && ip[1] / 16 == 1)) //172.16.0.0/12 (private)
+			return false;
+		return true;
+	}


- if (data->set.ftp_skip_ip)
+	bool skipIp = data->set.ftp_skip_ip;
+	if (!skipIp && !is_routable_ip_v4(ip))
+	{
+		unsigned int ip_ctrl[4];
+		if (4 != sscanf(control_address(conn), "%u.%u.%u.%u",
+						&ip_ctrl[0], &ip_ctrl[1], &ip_ctrl[2], &ip_ctrl[3]) ||
+			is_routable_ip_v4(ip_ctrl))
+			skipIp = true;
+	}
+
+	if (skipIp)

__________________________________________________________________________________________________________
/lib/ftp.c
https://github.com/curl/curl/issues/4342

- result = ftp_nb_type(conn, TRUE, FTP_LIST_TYPE);
+ result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_LIST_TYPE);

__________________________________________________________________________________________________________


-----------------
| libssh2 1.9.0 |
-----------------
__________________________________________________________________________________________________________
src/session.c
memory leak: https://github.com/libssh2/libssh2/issues/28

-if (session->state & LIBSSH2_STATE_NEWKEYS)
+//if (session->state & LIBSSH2_STATE_NEWKEYS)

__________________________________________________________________________________________________________
move the following constants from src/sftp.h to include/libssh2_sftp.h:
	#define MAX_SFTP_OUTGOING_SIZE 30000
	#define MAX_SFTP_READ_SIZE 30000

__________________________________________________________________________________________________________
src/transport.c
https://github.com/libssh2/libssh2/pull/443

- if (encrypted && compressed)
+ if (encrypted && compressed && session->local.comp_abstract)

__________________________________________________________________________________________________________
src/openssl.cpp
properly support ssh-ed25519: https://github.com/libssh2/libssh2/pull/416

+static int
+gen_publickey_from_ed_evp(LIBSSH2_SESSION* session,
+                          unsigned char** method,
+                          size_t* method_len,
+                          unsigned char** pubkeydata,
+                          size_t* pubkeydata_len,
+                          EVP_PKEY* pk)
+{
+    const char methodName[] = "ssh-ed25519";
+    unsigned char* methodBuf = NULL;
+    unsigned char* pubKeyBuf = NULL;
+    size_t pubKeyLen = 0;
+    size_t edKeyLen = 0;
+    unsigned char* bufPos = NULL;
+
+    _libssh2_debug(session,
+                   LIBSSH2_TRACE_AUTH,
+                   "Computing public key from ED private key envelop");
+
+    methodBuf = LIBSSH2_ALLOC(session, sizeof(methodName) - 1);
+    if (!methodBuf)
+    {
+        _libssh2_error(session, LIBSSH2_ERROR_ALLOC,
+                       "Unable to allocate memory for private key data");
+        goto cleanup;
+    }
+	
+    if (EVP_PKEY_get_raw_public_key(pk, NULL, &edKeyLen) != 1)
+    {
+        _libssh2_error(session, LIBSSH2_ERROR_PROTO,
+                       "EVP_PKEY_get_raw_public_key failed");
+        goto cleanup;
+    }
+
+    pubKeyLen = 4 + sizeof(methodName) - 1  + 4 + edKeyLen;
+    bufPos = pubKeyBuf = LIBSSH2_ALLOC(session, pubKeyLen);
+    if (!pubKeyBuf)
+    {
+        _libssh2_error(session, LIBSSH2_ERROR_ALLOC,
+                       "Unable to allocate memory for private key data");
+        goto cleanup;
+    }
+
+    _libssh2_store_str(&bufPos, methodName, sizeof(methodName) - 1);
+    _libssh2_store_u32(&bufPos, edKeyLen);
+
+    if (EVP_PKEY_get_raw_public_key(pk, bufPos, &edKeyLen) != 1)
+    {
+        _libssh2_error(session, LIBSSH2_ERROR_PROTO,
+                       "EVP_PKEY_get_raw_public_key failed");
+        goto cleanup;
+    }
+
+    memcpy(methodBuf, methodName, sizeof(methodName) - 1);
+    *method         = methodBuf;
+    *method_len     = sizeof(methodName) - 1;
+    *pubkeydata     = pubKeyBuf;
+    *pubkeydata_len = pubKeyLen;
+    return 0;
+
+cleanup:
+    if (methodBuf)
+        LIBSSH2_FREE(session, methodBuf);
+    if (pubKeyBuf)
+        LIBSSH2_FREE(session, pubKeyBuf);
+    return -1;
+}
+
static int
gen_publickey_from_ed25519_openssh_priv_data(LIBSSH2_SESSION* session,
                                             struct string_buf* decrypted,
                                             unsigned char** method,
                                             size_t* method_len,
                                             unsigned char** pubkeydata,




int
_libssh2_ed25519_new_private_frommemory(libssh2_ed25519_ctx** ed_ctx,
                                        LIBSSH2_SESSION* session,
                                        const char* filedata,
                                        size_t filedata_len,
                                        unsigned const char* passphrase)
{
+    libssh2_ed25519_ctx* ctx = NULL;
+
+    _libssh2_init_if_needed();
+
+    ctx = _libssh2_ed25519_new_ctx();
+    if (!ctx)
+        return _libssh2_error(session, LIBSSH2_ERROR_ALLOC,
+                              "Unable to allocate memory for ed25519 key");
+
+    if (read_private_key_from_memory((void**)&ctx->private_key, (pem_read_bio_func)&PEM_read_bio_PrivateKey,
+                                     filedata, filedata_len, passphrase) == 0)
+    {
+        if (EVP_PKEY_id(ctx->private_key) != EVP_PKEY_ED25519)
+        {
+            _libssh2_ed25519_free(ctx);
+            return _libssh2_error(session, LIBSSH2_ERROR_PROTO,
+                                  "Private key is not an ed25519 key");
+        }
+
+        *ed_ctx = ctx;
+        return 0;
+    }
+    _libssh2_ed25519_free(ctx);

    return read_openssh_private_key_from_memory((void**)ed_ctx, session,
                                                "ssh-ed25519",
                                                filedata, filedata_len,
                                                passphrase);

												
												
#ifdef HAVE_OPAQUE_STRUCTS
    pktype = EVP_PKEY_id(pk);
#else
    pktype = pk->type;
#endif

    switch (pktype)
    {
+#if LIBSSH2_ED25519
+        case EVP_PKEY_ED25519 :
+            st = gen_publickey_from_ed_evp(session, method, method_len,
+                                           pubkeydata, pubkeydata_len, pk);
+            break;
+#endif /* LIBSSH2_ED25519 */
        case EVP_PKEY_RSA :
            st = gen_publickey_from_rsa_evp(session, method, method_len,
__________________________________________________________________________________________________________


-------------------
| wxWidgets 3.1.4 |
-------------------
__________________________________________________________________________________________________________
/include/wx/window.h
wxWidgets/GTK2 on some Linux systems incorrectly detects high DPI: https://freefilesync.org/forum/viewtopic.php?t=6114
=> hack away high-DPI support for GTK2 (= pretend GTK2 has device independent pixels, which it clearly has not!)

    #include "wx/gtk/window.h"
-   #ifdef __WXGTK3__
+    //#ifdef __WXGTK3__
        #define wxHAVE_DPI_INDEPENDENT_PIXELS
-   #endif
+	//#endif
__________________________________________________________________________________________________________
/src/aui/framemanager.cpp:
Fix incorrect pane height calculations:

-        // determine the dock's minimum size
-        bool plus_border = false;
-        bool plus_caption = false;
-        int dock_min_size = 0;
-        for (j = 0; j < dock_pane_count; ++j)
-        {
-            wxAuiPaneInfo& pane = *dock.panes.Item(j);
-            if (pane.min_size != wxDefaultSize)
-            {
-                if (pane.HasBorder())
-                    plus_border = true;
-                if (pane.HasCaption())
-                    plus_caption = true;
-                if (dock.IsHorizontal())
-                {
-                    if (pane.min_size.y > dock_min_size)
-                        dock_min_size = pane.min_size.y;
-                }
-                else
-                {
-                    if (pane.min_size.x > dock_min_size)
-                        dock_min_size = pane.min_size.x;
-                }
-            }
-        }
-
-        if (plus_border)
-            dock_min_size += (pane_borderSize*2);
-        if (plus_caption && dock.IsHorizontal())
-            dock_min_size += (caption_size);
-
-        dock.min_size = dock_min_size;

+        // determine the dock's minimum size
+        int dock_min_size = 0;
+       for (j = 0; j < dock_pane_count; ++j)
+        {
+            wxAuiPaneInfo& pane = *dock.panes.Item(j);
+            if (pane.min_size != wxDefaultSize)
+            {
+				int paneSize = dock.IsHorizontal() ? pane.min_size.y : pane.min_size.x;
+                if (pane.HasBorder())
+					paneSize += 2 * pane_borderSize;
+                if (pane.HasCaption() && dock.IsHorizontal())
+					paneSize += caption_size;
+
+				if (paneSize > dock_min_size)
+					dock_min_size = paneSize;
+            }
+        }
+
+        dock.min_size = dock_min_size;

__________________________________________________________________________________________________________
/src/gtk/menu.cpp

-g_signal_connect(m_menu, "map", G_CALLBACK(menu_map), this);
+g_signal_connect(m_menu, "show", G_CALLBACK(menu_map), this); //"map" is never called on Ubuntu Unity, but "show" is

__________________________________________________________________________________________________________
/src/gtk/window.cpp
Backspace not working in filter dialog: http://www.freefilesync.org/forum/viewtopic.php?t=347

 void wxWindowGTK::ConnectWidget( GtkWidget *widget )
 {
-     static bool isSourceAttached;
-    if (!isSourceAttached)
-    {
-        // attach GSource to detect new GDK events
-        isSourceAttached = true;
-        static GSourceFuncs funcs =
-        {
-            source_prepare, source_check, source_dispatch,
-            NULL, NULL, NULL
-        };
-        GSource* source = g_source_new(&funcs, sizeof(GSource));
-        // priority slightly higher than GDK_PRIORITY_EVENTS
-        g_source_set_priority(source, GDK_PRIORITY_EVENTS - 1);
-        g_source_attach(source, NULL);
-        g_source_unref(source);
-    }
 
     g_signal_connect (widget, "key_press_event",
                       G_CALLBACK (gtk_window_key_press_callback), this);

__________________________________________________________________________________________________________
bgstack15