DC++ Allowing \n char in Titlebar/topic

Bug #657241 reported by iceman50
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ADCH++
Invalid
Low
Unassigned
DC++
Confirmed
Low
Unassigned

Bug Description

As of DC++ 0.777 Rev. 2258, DC++ is allowing \n (newline) characters to be placed into the title bar/topic effectively pushing text upwards and with 2 or more /n chars the text is completely gone, \n chars should be removed from the titlebar/topic.

Tags: core win32-ui
eMTee (realprogger)
Changed in dcplusplus:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
poy (poy) wrote :
Revision history for this message
iceman50 (bdcdevel) wrote :

The problem isn't that DC++ accepts \n as a valid char, the problem is that it should filter it from making a new line i.e for every \n the text moves up on the titlebar, after two new line chars all you can see is the bottoms of certain chars. Attaching a png that shows the effect

Revision history for this message
eMTee (realprogger) wrote :

In theory poy's patches (not available in sf anymore) should fix this problem for ADC and some solution can be added for nmdc, too.
Poy, can you add those patches here so we can test them?

Revision history for this message
poy (poy) wrote :

here are the old patches. the ADCH++ one won't apply; it should be applied to adchppd.cpp instead.
with the latest DC++ and ADCH++, i can still reproduce the space in the hub name easily (should be forbidden), but not a new line; so there may already be some sanitization going on.
note that to test with ADCH++, one must disable scripts as they implement their own validation of the hub name and description.

Revision history for this message
poy (poy) wrote :
Revision history for this message
poy (poy) wrote :
Revision history for this message
eMTee (realprogger) wrote :

I cannot find any code for sanitization in ADCH++ (r516) and indeed it accepts the new lines for name and description...

Revision history for this message
eMTee (realprogger) wrote :

Here's the patch for the current ADCH++ head rev.

affects: dcplusplus → adchpp
affects: adchpp → dcplusplus
Changed in adchpp:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Pirre (pierreparys) wrote :

seems the lua validation catches the problem as far ADCH is concerned ...

Changed in adchpp:
status: Confirmed → Invalid
Fredrik Ullner (ullner)
tags: added: core win32-ui
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.