Bug 471940

Summary: Konversation does not send CAP END if no CAP REQ is required
Product: [Applications] konversation Reporter: Thomas Jepp <kde>
Component: protocolAssignee: Konversation Developers <konversation-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thomas Jepp 2023-07-04 12:23:38 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Connect to irc.aachat.net (SSL/6697)
2. Konversation will start connecting, and hang after CAP LS

OBSERVED RESULT
Konversation will start connecting, and hang after CAP LS

EXPECTED RESULT
Konversation continues to get the MOTD and then join channels

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux - 5.27.6
(available in About System)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
This happens because as per https://ircv3.net/specs/extensions/capability-negotiation.html, servers are required to wait for CAP END after CAP LS or CAP REQ. Konversation never sends CAP END.

Merge request will be submitted on Gitlab shortly.
Comment 1 Thomas Jepp 2023-07-04 12:25:09 UTC
Raised https://invent.kde.org/network/konversation/-/merge_requests/87 :)
Comment 2 argonel 2023-08-07 01:49:10 UTC
Git commit 381c067f62a77a2e0dfbac801546ebbd98b0b43f by Eli MacKenzie, on behalf of Thomas Jepp.
Committed on 07/08/2023 at 03:49.
Pushed by argonel into branch 'release/23.08'.

caps: prevent connection hang when none are requested

Konversation didn't send CAP END after CAP LS, unless it actually requested caps with CAP REQ. As per https://ircv3.net/specs/extensions/capability-negotiation.html it must send CAP END - otherwise servers will just hang the connection and never complete the initial registration.

M  +2    -0    src/irc/server.cpp

https://invent.kde.org/network/konversation/-/commit/381c067f62a77a2e0dfbac801546ebbd98b0b43f
Comment 3 argonel 2023-08-07 01:58:13 UTC
Git commit 1bc9a08c119c963d8a1be7dec5c8aa98231ec589 by Eli MacKenzie, on behalf of Thomas Jepp.
Committed on 07/08/2023 at 03:58.
Pushed by argonel into branch 'master'.

caps: prevent connection hang when none are requested

Konversation didn't send CAP END after CAP LS, unless it actually requested caps with CAP REQ. As per https://ircv3.net/specs/extensions/capability-negotiation.html it must send CAP END - otherwise servers will just hang the connection and never complete the initial registration.


(cherry picked from commit 381c067f62a77a2e0dfbac801546ebbd98b0b43f)

M  +2    -0    src/irc/server.cpp

https://invent.kde.org/network/konversation/-/commit/1bc9a08c119c963d8a1be7dec5c8aa98231ec589