FileZilla 3 development diary

Moderator: Project members

Message
Author
User avatar
botg
Site Admin
Posts: 35563
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: FileZilla 3 development diary

#901 Post by botg » 2009-10-12 10:26

Bugs. Wherever I look, bugs. Bugs, bugs in all directions, bugs everywhere. Instead of working on new features I keep chasing bugs all over the place. Not just in my code but also in other projects.


For starters, a simple bug in vsfpd. It requires session reusing if using FTP over TLS, yet sessions can easily expire, so sessions cannot be reused even if a client wanted to.

Code: Select all

--- ssl.c.old	2009-08-08 03:50:52.000000000 +0200
+++ ssl.c	2009-10-08 18:56:55.488936000 +0200
@@ -143,6 +143,11 @@
       SSL_CTX_set_session_id_context(p_ctx, (void*) p_ctx_id,
                                      vsf_sysutil_strlen(p_ctx_id));
     }
+    if (tunable_require_ssl_reuse)
+    {
+      /* Ensure cached session doesn't expire */
+      SSL_CTX_set_timeout(p_ctx, 2147483647);
+    }
     p_sess->p_ssl_ctx = p_ctx;
     ssl_inited = 1;
   }
[/size]


Next, a bug in PuTTY, the code that calculates SHA512 sums doesn't work if compiled on a 64bit system. Does arithmetic that assumes 32bit unsigned integers and their overflow behavior on 64bit integers.

Code: Select all

Index: sshsh512.c
===================================================================
--- sshsh512.c	(revision 8690)
+++ sshsh512.c	(working copy)
@@ -13,14 +13,14 @@
  * overlap destination with one source, but the others can't.
  */
 #define add(r,x,y) ( r.lo = y.lo + x.lo, \
-		     r.hi = y.hi + x.hi + (r.lo < y.lo) )
-#define rorB(r,x,y) ( r.lo = (x.hi >> ((y)-32)) | (x.lo << (64-(y))), \
-		      r.hi = (x.lo >> ((y)-32)) | (x.hi << (64-(y))) )
-#define rorL(r,x,y) ( r.lo = (x.lo >> (y)) | (x.hi << (32-(y))), \
-		      r.hi = (x.hi >> (y)) | (x.lo << (32-(y))) )
-#define shrB(r,x,y) ( r.lo = x.hi >> ((y)-32), r.hi = 0 )
-#define shrL(r,x,y) ( r.lo = (x.lo >> (y)) | (x.hi << (32-(y))), \
-		      r.hi = x.hi >> (y) )
+		     r.hi = y.hi + x.hi + ((uint32)r.lo < (uint32)y.lo) )
+#define rorB(r,x,y) ( r.lo = ((uint32)x.hi >> ((y)-32)) | ((uint32)x.lo << (64-(y))), \
+		      r.hi = ((uint32)x.lo >> ((y)-32)) | ((uint32)x.hi << (64-(y))) )
+#define rorL(r,x,y) ( r.lo = ((uint32)x.lo >> (y)) | ((uint32)x.hi << (32-(y))), \
+		      r.hi = ((uint32)x.hi >> (y)) | ((uint32)x.lo << (32-(y))) )
+#define shrB(r,x,y) ( r.lo = (uint32)x.hi >> ((y)-32), r.hi = 0 )
+#define shrL(r,x,y) ( r.lo = ((uint32)x.lo >> (y)) | ((uint32)x.hi << (32-(y))), \
+		      r.hi = (uint32)x.hi >> (y) )
 #define and(r,x,y) ( r.lo = x.lo & y.lo, r.hi = x.hi & y.hi )
 #define xor(r,x,y) ( r.lo = x.lo ^ y.lo, r.hi = x.hi ^ y.hi )
 #define not(r,x) ( r.lo = ~x.lo, r.hi = ~x.hi )
[/size]

Last but not least a bug in the timer code in wxWidgets, could happen that a previously deleted timer object gets accessed, leading to a segfault.

Code: Select all

--- wxWidgets/branches/WX_2_8_BRANCH/src/gtk/timer.cpp	2009/10/08 13:52:08	62332
+++ wxWidgets/branches/WX_2_8_BRANCH/src/gtk/timer.cpp	2009/10/08 13:56:30	62333
@@ -30,7 +30,8 @@
 
     // Don't change the order of anything in this callback!
 
-    if (timer->IsOneShot())
+    const bool oneshot = timer->IsOneShot();
+    if ( oneshot )
     {
         // This sets m_tag to -1
         timer->Stop();
@@ -50,7 +51,7 @@
     if (app)
         app->WakeUpIdle();
 
-    if (timer->IsOneShot())
+    if ( oneshot )
         return FALSE;
 
     return TRUE;
[/size]



On a different front I've moved FileZilla's Trac to a new server courtesy of NDC Host. The result is a huge improvement in Trac performance and also some improvement for the other services still running on the previous server now that Trac is elsewhere.
Migrating Trac took me longer than expected, I forgot that I had made several custom modifications to the account manager plugin to get it into a useful shape. Nonetheless it works now after re-applying lots of patches mostly grabbed from Trac's Trac.
Another problem was the sheer size of the Trac database, almost a gigabyte of data. Many millions of old, unused sessions were stored in the database. Trac only purges those after 90 days, a far too long time I think. Also, registered users who didn't make any contributions weren't purged either. Many thousands of those as well, most likely all bots. I've written a few queries that get rid of these old sessions:

Code: Select all

DELETE FROM session WHERE session.last_visit < (select extract('epoch' from current_timestamp)) - 3600 * 24 * 7
  and not exists (SELECT ticket.reporter FROM ticket WHERE ticket.reporter = session.sid)
  and not exists (SELECT ticket_change.author FROM ticket_change WHERE ticket_change.author = session.sid)
  and not exists (SELECT wiki.author FROM wiki WHERE wiki.author = session.sid)
  ;
DELETE FROM attachment WHERE attachment.type = 'ticket' and not exists (SELECT ticket.id FROM ticket WHERE cast(ticket.id as text) = attachment.id);
DELETE FROM session_attribute where not exists (SELECT * FROM session WHERE session.sid = session_attribute.sid);
DELETE FROM auth_cookie WHERE not exists (SELECT * FROM session WHERE session.sid = auth_cookie.name);
[/size]


Of the things ahead, another service that will get moved to the new server is the nightly build service. One change I'll implement on the way is to get rid of the nightly aspect, in future development builds will be created after each commit. Gives users a much more timely chance to test my fixes in response to their bug reports.

User avatar
botg
Site Admin
Posts: 35563
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: FileZilla 3 development diary

#902 Post by botg » 2009-10-18 10:41

I've finally revamped the welcome dialog that appears for first-time users and after an update.

Can you spot the difference?
welcome_old.png
welcome_old.png (6.21 KiB) Viewed 7732 times
welcome_new.png
welcome_new.png (14.18 KiB) Viewed 7732 times

User avatar
botg
Site Admin
Posts: 35563
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: FileZilla 3 development diary

#903 Post by botg » 2009-10-24 15:07

Sneak preview:
sneak_preview.png
sneak_preview.png (70.1 KiB) Viewed 7672 times

User avatar
boco
Contributor
Posts: 26938
Joined: 2006-05-01 03:28
Location: Germany

Re: FileZilla 3 development diary

#904 Post by boco » 2009-10-24 15:17

Tabbed servers?
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

eyebex
226 Transfer OK
Posts: 171
Joined: 2004-04-02 15:24

Re: FileZilla 3 development diary

#905 Post by eyebex » 2009-10-25 09:45

Cool, but if it's about tabbed servers, I wonder why the log is not part of the tab, as it lists per-server-specific stuff.
Last edited by eyebex on 2009-10-27 13:18, edited 1 time in total.

User avatar
botg
Site Admin
Posts: 35563
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: FileZilla 3 development diary

#906 Post by botg » 2009-10-25 10:08

It's a combined log for all actions, including queue ones.

redleg
226 Transfer OK
Posts: 267
Joined: 2008-11-24 17:23

Re: FileZilla 3 development diary

#907 Post by redleg » 2009-10-27 20:23

TABS! lol, Tim, you've outdone yourself again, friend. Thanks for adding this multiple server/Tab feature. (Nice welcome screen as well, I like) :mrgreen:
Network Config Guide (setup & connection issues)
FileZilla wiki (FAQs, screenshots, & "got logs?" info:)
FTP server test (plain), FTP(E)S server test (encrypted)
FTP commands (see also List_of_FTP_server_return_codes)

User avatar
botg
Site Admin
Posts: 35563
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: FileZilla 3 development diary

#908 Post by botg » 2009-10-27 20:30

For the record: 3.3.0-beta1 has been released.

User avatar
boco
Contributor
Posts: 26938
Joined: 2006-05-01 03:28
Location: Germany

Re: FileZilla 3 development diary

#909 Post by boco » 2009-10-27 20:32

How do I get the tabs to appear? 3.3.0beta1
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

redleg
226 Transfer OK
Posts: 267
Joined: 2008-11-24 17:23

Re: FileZilla 3 development diary

#910 Post by redleg » 2009-10-27 20:37

boco wrote:How do I get the tabs to appear? 3.3.0beta1
File> new tab or [CTRL+T]
Network Config Guide (setup & connection issues)
FileZilla wiki (FAQs, screenshots, & "got logs?" info:)
FTP server test (plain), FTP(E)S server test (encrypted)
FTP commands (see also List_of_FTP_server_return_codes)

User avatar
boco
Contributor
Posts: 26938
Joined: 2006-05-01 03:28
Location: Germany

Re: FileZilla 3 development diary

#911 Post by boco » 2009-10-27 21:14

Wow, I'm blind...

But it would be even better if FZ would ask on a new connection, break connection? Yes, No, New tab.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

redleg
226 Transfer OK
Posts: 267
Joined: 2008-11-24 17:23

Re: FileZilla 3 development diary

#912 Post by redleg » 2009-10-27 21:23

yes, nice feature indeed! (you coding it?);)
Network Config Guide (setup & connection issues)
FileZilla wiki (FAQs, screenshots, & "got logs?" info:)
FTP server test (plain), FTP(E)S server test (encrypted)
FTP commands (see also List_of_FTP_server_return_codes)

User avatar
boco
Contributor
Posts: 26938
Joined: 2006-05-01 03:28
Location: Germany

Re: FileZilla 3 development diary

#913 Post by boco » 2009-10-28 00:38

A small annoyance: Every time a new tab is opened it moves the layout to the right side.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

redleg
226 Transfer OK
Posts: 267
Joined: 2008-11-24 17:23

Re: FileZilla 3 development diary

#914 Post by redleg » 2009-10-28 01:44

found another little bug. Every time settings are accessed (whether clicking ok or even if canceled) all tabs other than the first will go full length side to side (left to right) for directory and file panes. Changing it back to classic view does not fix it, only restarting FZc will get the classic view back for all tabs. This happened on Vista(Ult) SP2, haven't tested it on my other box yet.
Network Config Guide (setup & connection issues)
FileZilla wiki (FAQs, screenshots, & "got logs?" info:)
FTP server test (plain), FTP(E)S server test (encrypted)
FTP commands (see also List_of_FTP_server_return_codes)

User avatar
botg
Site Admin
Posts: 35563
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: FileZilla 3 development diary

#915 Post by botg » 2009-10-28 09:43

boco wrote:A small annoyance: Every time a new tab is opened it moves the layout to the right side.
Screenshot or it didn't happen.
redleg wrote:Every time settings are accessed (whether clicking ok or even if canceled) all tabs other than the first will go full length side to side (left to right) for directory and file panes.
Fixed.

By the way, for bug reports there's http://trac.filezilla-project.org/

Post Reply