TLS port should not be allowed to be the same as regular ports

Bug #363092 reported by Björn Pettersson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AirDC++
Medium
Unassigned
DC++
Low
Unassigned
LinuxDC++
Low
Unassigned

Bug Description

Using bzr release from yesterday.

Starting linuxdcpp I got a message saying the TLS port was busy and that I should change the TLS port in settings or close whatever application currently using that port.

I had set the TLS port to be the same as the regular TCP and UDP ports.This was what I did wrong.

It isn't obvious that it doesn't work with this setup, and even if it were obvious, I should not be allowed to set the TLS port to be the same as any of the other two ports. (Or, if TLS only uses TCP, the TLS port should not be allowed to be the same as the regular TCP port.)

description: updated
Revision history for this message
MikeJJ (mrmikejj) wrote :

For your info, It's just TCP. :)

Revision history for this message
Razzloss (razzloss) wrote :

Yeah, any volunteers to rewrite settingsdialog to report errors properly?

--RZ

Changed in linuxdcpp:
importance: Undecided → Low
status: New → Confirmed
eMTee (realprogger)
Changed in dcplusplus:
status: New → Confirmed
importance: Undecided → Low
Fredrik Ullner (ullner)
tags: added: core
Fredrik Ullner (ullner)
tags: added: win32-ui
Revision history for this message
Fredrik Ullner (ullner) wrote :

This patch will report an error when it's the same and not set up the secure server... This is an untested patch, so I'd appreciate if someone could verify its functionality.

Note that I did not change the UI, so the user will only get an error when starting DC++ or setting the TCP/TLS ports.

Revision history for this message
poy (poy) wrote :

not tested either but the code looks fine.

i would also add a check when changing settings to disallow setting the same ports in the first place.

Revision history for this message
Fredrik Ullner (ullner) wrote :

This patch will add popups when the user tries to set invalid values.

Also, it will write an empty string if the value is the same as as another port.

Changed in dcplusplus:
status: Confirmed → In Progress
Revision history for this message
poy (poy) wrote :

good, but there are a couple of details to fix:

1) the search port doesn't need validation; it can be (and often is) the same as another port (works as one is TCP, the other UDP).

2) i18n macros: change "_T" to "T_" and "Text::toT(str(F_(" to "str(TF_(".

maksis (maksis)
Changed in airdcpp:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Fredrik Ullner (ullner) wrote :

The attached patch fixes the mentioned two items.

On 1), I initially did not do it with the search box, but then I saw the following in the help for the TLS box: "Note that this port value should be different than the ones used for transfers (TCP) and searches (UDP)."

Revision history for this message
poy (poy) wrote :

looking good... feel free to correct help inaccuracies as well.

Fredrik Ullner (ullner)
Changed in dcplusplus:
status: In Progress → Fix Committed
Revision history for this message
iceman50 (bdcdevel) wrote :

Shouldn't validatePort be changed as taking the TextBoxPtr's are pointless?

Revision history for this message
poy (poy) wrote :

Fixed in DC++ 0.840.

Changed in dcplusplus:
status: Fix Committed → Fix Released
Revision history for this message
Sopor (sopor) wrote :

This would be nice if this could be fixed in AirDC++ too. Too many users are mixing this up and write the same port number in TLS as they use in TCP...

Sopor (sopor)
Changed in airdcpp:
status: Confirmed → Fix Committed
Sopor (sopor)
Changed in airdcpp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers