Bug 108440 - knetattach - can't select high ssh ports
Summary: knetattach - can't select high ssh ports
Status: RESOLVED FIXED
Alias: None
Product: knetattach
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Unknown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-02 14:27 UTC by Jens Weibler
Modified: 2008-07-11 15:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to fix limit... (90 bytes, patch)
2007-04-05 22:12 UTC, Richie Ward
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Weibler 2005-07-02 14:27:52 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages

knetattach has a hardcoded maximum port value of 32768..
Comment 1 danarmak 2005-07-02 14:54:31 UTC
...And since fish:// etc urls allow ports upto 65535, so should knetattach.
Comment 2 Jorge Salamero Sanz 2006-01-23 09:28:39 UTC
here the same problem, i want to connect to the port 46814 but i can't write down the port number. (using debian unstable, kde 3.5.0-3)
Comment 3 Christo 2006-03-16 08:57:43 UTC
knetattach-wizard for sftp only accepts port up to 32768 .. i want to use 56789

Comment 4 Mike 2006-05-20 04:45:54 UTC
While I find it odd that knetattach doesn't allow all valid ports (up to 65535), you can enter the correct port manually in a .desktop file. On my KDE 3.4 at least, they are located in ~/.kde3.4/share/apps/remoteview

Edit to fit your needs.

filename:

EXAMPLE.desktop

contents of the file:

[Desktop Entry]
Icon=package_network
Name=EXAMPLE
Type=Link
URL=fish://USERNAME@ADDRESS:PORT/


Comment 5 Mikkel Høgh 2007-02-24 22:55:55 UTC
This bug is not Gentoo-specific. I do not know C++, but it would seem that whoever made the Network Folder Wizard used a signed int for the port number value - which obviously is a bug, and hopefully, it should not be too much trouble to fix :)
Comment 6 Richie Ward 2007-04-05 22:01:34 UTC

Found fix:

See: http://websvn.kde.org/*checkout*/trunk/KDE/kdebase/knetattach/knetattach.ui

          <widget class="QSpinBox" name="_port" >
            <property name="sizePolicy" >
              <sizepolicy>
                <hsizetype>1</hsizetype>
                <vsizetype>0</vsizetype>
                <horstretch>1</horstretch>
                <verstretch>0</verstretch>
              </sizepolicy>
            </property>
            <property name="maximum" >
              <number>32768</number>
            </property>
            <property name="minimum" >
              <number>1</number>
            </property>
          </widget>

should be replaced with:

          <widget class="QSpinBox" name="_port" >
            <property name="sizePolicy" >
              <sizepolicy>
                <hsizetype>1</hsizetype>
                <vsizetype>0</vsizetype>
                <horstretch>1</horstretch>
                <verstretch>0</verstretch>
              </sizepolicy>
            </property>
            <property name="maximum" >
              <number>65535</number>
            </property>
            <property name="minimum" >
              <number>1</number>
            </property>
          </widget>
Comment 7 Richie Ward 2007-04-05 22:12:16 UTC
Created attachment 20193 [details]
Patch to fix limit...

I made this patch using diff.. havnt used diff much, so i hope I made it
correctly. Please commit this to /trunk/KDE/kdebase/knetattach/knetattach.ui
Comment 8 Harald Sitter 2008-07-11 15:40:40 UTC
Applied in (at least) 4.1 beta2