Password length is limited to 85 characters #936

Closed
opened 2026-10-05 04:54:03 +02:00 by adam · 5 comments
Owner

When a user sets a password longer than 85 characters, they become unable to log into IRC. They are still able to log into webadmin though.

Multiple 85-character passwords worked, while not a single 86-character password worked.

LastPass generates passwords up to 99 characters long. It is annoying to have to reduce the password length down to 85.

Server

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
/znc version
<*status> ZNC 1.7.2+deb3 - https://znc.in
<*status> IPv6: yes, SSL: yes, DNS: threads, charset: yes, i18n: no, build: autoconf

No changes outside of webadmin.

Client

$ apt-cache policy hexchat
hexchat:
  Installed: 2.14.2-5
  Candidate: 2.14.2-5
  Version table:
 *** 2.14.2-5 500
        500 http://archive.ubuntu.com/ubuntu eoan/universe amd64 Packages
        100 /var/lib/dpkg/status

Using Login method "Default"

When a user sets a password longer than 85 characters, they become unable to log into IRC. They are still able to log into webadmin though. Multiple 85-character passwords worked, while not a single 86-character password worked. LastPass generates passwords up to 99 characters long. It is annoying to have to reduce the password length down to 85. # Server ``` $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster ``` ``` /znc version <*status> ZNC 1.7.2+deb3 - https://znc.in <*status> IPv6: yes, SSL: yes, DNS: threads, charset: yes, i18n: no, build: autoconf ``` No changes outside of webadmin. # Client ``` $ apt-cache policy hexchat hexchat: Installed: 2.14.2-5 Candidate: 2.14.2-5 Version table: *** 2.14.2-5 500 500 http://archive.ubuntu.com/ubuntu eoan/universe amd64 Packages 100 /var/lib/dpkg/status ``` Using Login method "Default" <!-- github-sync-id:548520861 -->
adam closed this issue 2026-10-05 04:54:03 +02:00
Author
Owner

When a user sets a password longer than 85 characters, they become unable to log into IRC.

Cannot reproduce. Here is what I tried:

$ ( echo PASS abc:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 ; echo NICK abc ; echo USER a b c d ; sleep 1 ) | telnet localhost 1234
Trying ::1...
Connected to localhost.
Escape character is '^]'.
:*status!znc@znc.in NOTICE abc :You have no networks configured. Use /znc AddNetwork <network> to add one.
:irc.znc.in 001 abc :Welcome to ZNC

This password has length 100 (plus three characters for the user name).

I did the same with a password of length 200. It also worked.

(However, I used latest git/master aka znc-1.7.5-204-g6d1ef8d0. No, I do not think that this should make a difference.)

> When a user sets a password longer than 85 characters, they become unable to log into IRC. Cannot reproduce. Here is what I tried: ``` $ ( echo PASS abc:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 ; echo NICK abc ; echo USER a b c d ; sleep 1 ) | telnet localhost 1234 Trying ::1... Connected to localhost. Escape character is '^]'. :*status!znc@znc.in NOTICE abc :You have no networks configured. Use /znc AddNetwork <network> to add one. :irc.znc.in 001 abc :Welcome to ZNC ``` This password has length 100 (plus three characters for the user name). I did the same with a password of length 200. It also worked. (However, I used latest git/master aka `znc-1.7.5-204-g6d1ef8d0`. No, I do not think that this should make a difference.) <!-- github-comment-id:573385224 -->
Author
Owner

I just ran the following (after adjusting the password to match):

$ ( echo 'PASS abc:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789' ; echo NICK admin ; echo USER admin admin_ ; sleep 1 ) | openssl s_client -connect 192.168.3.110:6690

[ ... ]

read R BLOCK
:irc.znc.in 464 admin :Invalid Password
closed

It still doesn't work.

I just ran the following (after adjusting the password to match): ``` $ ( echo 'PASS abc:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789' ; echo NICK admin ; echo USER admin admin_ ; sleep 1 ) | openssl s_client -connect 192.168.3.110:6690 [ ... ] read R BLOCK :irc.znc.in 464 admin :Invalid Password closed ``` It still doesn't work. <!-- github-comment-id:573393329 -->
Author
Owner

(after adjusting the password to match)

Did you also add the user abc that is used here?

> (after adjusting the password to match) Did you also add the user `abc` that is used here? <!-- github-comment-id:573393612 -->
Author
Owner

Oh. I didn't realize abc was a user and not part of the password. I added the user and now the following is working:

$ ( echo 'PASS abc:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789' ; echo NICK abc ; echo USER abc abc_ ; sleep 1 ) | openssl s_client -connect 192.168.3.110:6690

[ ... ]

read R BLOCK
:*status!znc@znc.in NOTICE abc :You have no networks configured. Use /znc AddNetwork <network> to add one.
:irc.znc.in 001 abc :Welcome to ZNC
DONE

I also tested the behavior to be the same on 1.8.x-git-204-6d1ef8d0 at (6d1ef8d099) on the Ubuntu machine.

However, the login still doesn't work in HexChat.

Oh. I didn't realize `abc` was a user and not part of the password. I added the user and now the following is working: ``` $ ( echo 'PASS abc:0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789' ; echo NICK abc ; echo USER abc abc_ ; sleep 1 ) | openssl s_client -connect 192.168.3.110:6690 [ ... ] read R BLOCK :*status!znc@znc.in NOTICE abc :You have no networks configured. Use /znc AddNetwork <network> to add one. :irc.znc.in 001 abc :Welcome to ZNC DONE ``` I also tested the behavior to be the same on 1.8.x-git-204-6d1ef8d0 at (6d1ef8d09923388d4d5d390a4db898ca6194a2be) on the Ubuntu machine. However, the login still doesn't work in HexChat. <!-- github-comment-id:573395755 -->
Author
Owner

Using Wireshark after disabling SSL, I finally discovered that it's HexChat's fault for truncating the password (hexchat/hexchat#1296).

ZNC is handling everything properly. I will consider switching my IRC GUI then.

Using Wireshark after disabling SSL, I finally discovered that it's HexChat's fault for truncating the password (hexchat/hexchat#1296). ZNC is handling everything properly. I will consider switching my IRC GUI then. <!-- github-comment-id:573398289 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#936