mIRC Homepage

Ident userid limited to 10 chars

Posted By: armyn

Ident userid limited to 10 chars - 11/01/20 06:15 AM

User original : Samir3577!o-mmc-ca808ffbe@ (ident with 15 chars)

By typing this command on mIRC 7.58:
Quote
//echo -a $address(Samir3577,0),1,64)


He returns:
Quote
*!-ca808ffbe@....
ident with 10 chars ???!!

The identity remains blocked at 10 characters but I configured UnrealIRCd 5.0.1 and Anope 2 up to "20 characters" but on mIRC it stops at 10.
Posted By: klez

Re: Ident userid limited to 10 chars - 11/01/20 10:48 AM

I can also confirm this.. is not a bug, but a suggestion instead! I suggest to make the Identd fields using unlimited chars.. because, in actual moment, many ZNC providers suggest to include in Identd the network used (in case of multiple networks support), so the id for ZNC must be, for example: klez\Undernet
Posted By: Khaled

Re: Ident userid limited to 10 chars - 11/01/20 10:54 AM

Thanks for your bug report. This is intentional. mIRC used to support userids of any length. Unfortunately, most IRC networks do not allow userids longer than ten characters. If a client tries to use a userid longer than ten characters, it may experience issues connecting to the server. So a limit of ten characters is placed on the userid length. The userid is also stripped of most characters apart from alpha-numeric and a few other characters, as this can cause connection issues as well.

The only way to resolve this is for the maximum userid length to be specified as a token in the pre-logon IRCv3 CAPS Client Capability Negotiation. There is no IRCv3 CAPS token defined for this option at this time, so you would need to suggest it to the IRCv3 working group.

Update: actually, as noted in another post below, having this as an IRCv3 CAP would not help resolve the issue.
Posted By: klez

Re: Ident userid limited to 10 chars - 11/01/20 11:08 AM

Why just to know remove the restriction of 10 chars and to use any chars you want! The network will give the error and the user will understand what to change, no? Is more easier to do, than to request from IRCv3 groups.
Posted By: Khaled

Re: Ident userid limited to 10 chars - 11/01/20 11:37 AM

Quote
I suggest to make the Identd fields using unlimited chars.. because, in actual moment, many ZNC providers suggest to include in Identd the network used (in case of multiple networks support), so the id for ZNC must be, for example: klez\Undernet

That is a problem because, as mentioned in my above post, the ten character limit is there for a good reason. Before this limit was put in place, many users used to report connection issues due to long userids and/or userids containing characters rejected by IRC servers.

If I remove the limit, including the limit on the types of characters (since you want to use the \ character), we will return to users experiencing connection issues.

The only other option would be to add a cryptic option in the identd dialog, such as "Fix invalid userids", enabled by default. Users who need to use invalid userids would be able to disable this. However, it would affect their userids for all connections.
Posted By: Khaled

Re: Ident userid limited to 10 chars - 11/01/20 11:45 AM

Quote
Why just to know remove the restriction of 10 chars and to use any chars you want! The network will give the error and the user will understand what to change, no? Is more easier to do, than to request from IRCv3 groups.

No, of course not. If it was that easy, this change would not have had to be made in the first place.

Remember, IRC and mIRC are used by many users who are not technical. They should not have to understand how IRC works in order to use it. Even a technically-aware user would have difficulty if they tried to use IRC for the first time and received cryptic connection errors. Most users would likely just give up.

So, no, I will not simply remove the restriction.
Posted By: TECO

Re: Ident userid limited to 10 chars - 11/01/20 12:19 PM

Originally Posted by klez
Why just to know remove the restriction of 10 chars and to use any chars you want! The network will give the error and the user will understand what to change, no? Is more easier to do, than to request from IRCv3 groups.

Remember that UnrealIRCd is technically limited to 10 characters in ident. At least as a network admin and we on our network using UnrealIRCd 5.0.1 know this.
Posted By: Protopia

Re: Ident userid limited to 10 chars - 11/01/20 02:52 PM

Originally Posted by Khaled
Remember, IRC and mIRC are used by many users who are not technical. They should not have to understand how IRC works in order to use it. Even a technically-aware user would have difficulty if they tried to use IRC for the first time and received cryptic connection errors. Most users would likely just give up.

So, no, I will not simply remove the restriction.


Whilst I can quite understand the wish not to confuse non-technical users, it seems to me that restricting this to 10-chars might not be the only solution.

For example, would it be possible to allow unlimited characters, but if the user has used more than 10 characters then to watch for the error message that happens if the server doesn't support this and provide additional error message text advising that the probable cause is that the server only allows 10-characters?

If this is possible, then mIRC would not need to cater to the lowest common denominator functionality.
Posted By: armyn

Re: Ident userid limited to 10 chars - 11/01/20 11:22 PM

The stages tested :

1. In File > Select Server > Connect > Email with "ScRiPt123456789123456@nomail.com" - Once connected to the irc I have this: [00:18:46] *** Client connecting: joo (ScRiPt12345678912345@ (It's OK)

2. Now i type //echo -a $address(joo,0),1,64) - He returns 10 last chars : *!5678912345@2BFB4C7X.3EC376CX.C075ED4X.IP - The problem does not come from the connection with mirc and "identd" nor "email" but rather with $addresss
Posted By: KindOne

Re: Ident userid limited to 10 chars - 12/01/20 05:36 AM

Reported 2.5 years ago. https://forums.mirc.com/ubbthreads.php/topics/261024/
Posted By: Khaled

Re: Ident userid limited to 10 chars - 12/01/20 11:46 AM


Thanks, I knew we had discussed a similar issue before but couldn't find the post :-]
Posted By: klez

Re: Ident userid limited to 10 chars - 12/01/20 06:49 PM

Please, if you can to include an option "Fix invalid identds", as you said earlier, will be good.. Put as default to be checked smile Also will be good if include an identifier, for example $idfix and a command for scripters to enable/disable, for example: /idfix on/off.
Posted By: Khaled

Re: Ident userid limited to 10 chars - 17/01/20 07:03 PM

Quote
For example, would it be possible to allow unlimited characters, but if the user has used more than 10 characters then to watch for the error message that happens if the server doesn't support this and provide additional error message text advising that the probable cause is that the server only allows 10-characters?

I looked into this many years ago. There is a commented out section in the ERROR handling code that processes the "Closing Link" disconnect message from a server and tries to connect to the server again with a generic "user" userid. It does this if it sees an error message that matches "bad user info", "bad username", "invalid username", "not authorized", and "banned", which presumably were some of the errors returned by servers for invalid userids at the time this was tested. I am guessing I decided against using this method.

I just performed a quick test and saw the following for invalid userids:

Most networks disconnect you with an "ERROR Closing Link" message with "invalid username" as the error.

Some networks reply with "USER :Your username is not valid", giving the client a chance to send "USER" again to continue the logon.

Some networks chop userids and remove/replace invalid characters automatically allowing the logon to succeed.

Some networks handle invalid userids in USER and in identd differently/separately, ie. some networks will disconnect you if your identd userid is invalid, most will simply fix it. But most networks will disconnect you if your USER userid is invalid, and some will simply fix it.

If this change is made:

If a user uses a userid considered invalid by a network, the odds are that they will be disconnected. mIRC will then have to check the ERROR reply to see if it matches words related to invalid userids and then try to reconnect with a fixed userid. For these users, mIRC will have to connect to a server at least twice, in addition to the usual connection issues.

As every network has its own interpretation of what an invalid userid is, your userid may be different on every network. It's difficult to know whether this matters. The method mIRC has used for a long time means that users have had a consistent userid across all of the networks they use.

If a user currently has any scripts, settings, logon/connect/auth details, etc. that depend on their userid, they will be affected. If other users that you chat with in private, on channels, etc. have stored your address for use in different features, eg. highlight, op/ignore/voice/protect, notify, other types of authentication, etc., they will be affected.

mIRC will have to depend on seeing a specific combination of words in a specific language in the ERROR message to handle this, something that, as many of you know, I have been trying to avoid.

An IRCv3 CAP token could help, eg."username=options", where options describes maximum username length, the set of allowed characters, etc. or perhaps something even simpler, such as "username=safe" which means the server will accept any username format and will automatically fix it, so the client doesn't have to fix it itself. If a server doesn't list the token, the client will use a maximum length of 10 characters and a-zA-Z0-9._- which are acceptable on all networks.

If IRC servers simply replied with the USER error, that would resolve the USER invalid username issue.

However, neither of the above solutions will help if an identd request is sent before a client logs on (as some networks disconnect you for invalid identd userids).
Posted By: maroon

Re: Ident userid limited to 10 chars - 16/10/20 03:06 PM

Quote
If a server doesn't list the token, the client will use a maximum length of 10 characters and a-zA-Z0-9._- which are acceptable on all networks.


It looks like freenode accepts period hyphen underscore in the userid, but not as the 1st character.

\_test
\-test
\_

are valid nicks, but when mIRC strips the backslash to create the userid, these are rejected as invalid username. Unless it creates backwards compatibility issues, underscore and hyphen should be stripped if they're the 1st character of the userid, which means "\_" should change to "user" just like using nick "\\\\" does. The period isn't accepted by freenode as a valid character in a nick, but setting email to ".foo@bar.com" causes them to reject ".foo" as username.
© 2020 mIRC Discussion Forums