Hi, twiki/1:4.0.5-6 seems to contain the changes from http://bugs.debian.org/404222.
I had the same problem after the upgrade, but it turned out to be a configuration issue. $TWiki::cfg{DefaultUrlHost} in /etc/twiki/LocalSite.cfg must not have a trailing slash, which was no problem before. (Of course, protocol and hostname have to match.) Kai Pastor.