View Issue Details

IDProjectCategoryView StatusLast Update
0005977unrealircdpublic2023-03-17 14:32
Reporterarmyn Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product Version5.2.1.1 
Fixed in Version6.0.7 
Summary0005977: The "/gline %" is poorly organized
DescriptionThis week I typed this: /helpop gline
and I learned this:

[17:41:35] * Syntax: GLINE %<user@host mask or nick> [time] <reason>
[17:41:35] * (Adds a G-Line for user@host, but still allows the connection if the
[17:41:35] * user has a registered account and identifies using SASL)
[17:41:35] * GLINE -%<user@host mask> (Removes a soft G-Line for user@host)
[17:41:35] * Example: GLINE %*@*.idiot.net 900 Spammers (Adds a 15 min soft G-Line)
[17:41:35] * GLINE %*@*.idiot.net 1d5h Spammers (Adds a 29 hour soft G-Line)
[17:41:35] * GLINE %Idiot 1d Abuse
[17:41:35] * GLINE -%*@*.idiot.net
[17:41:35] * -


I never paid attention before

It is good this system, I will use it

However I tested and it presents a problem at this level:

For example we are present on the IRC server and we type: /gline %*@ip_me_present

we will receive this:

<-: irc.d.com 465 test: You are not welcome on this network. G-Lined: indésirable. Email [email protected] for more information.
<-: irc.d.com NOTICE test: You are not welcome on this network. G-Lined: indésirable. Email [email protected] for more information.

so that is correct.

But we want to reconnect, we get this:

<-: irc.d.com NOTICE test: unwanted
<-: irc.d.com NOTICE test: The server requires clients from this IP address to authenticate with a registered nickname and password.
<-: irc.d.com NOTICE test: Please reconnect using SASL, or authenticate now by typing: /QUOTE AUTH nick: password


normally instead it should put something like this:

: irc.d.com 465 test: The server requires clients from this IP address to authenticate with a registered nickname and password. Please reconnect using SASL, or authenticate now by typing: / QUOTE AUTH nick: password. Reason: indésirable

it would make more sense for it to display the raw 465 because that way no need to touch the client.

Or you have to put this:

<-: irc.d.com NOTICE test: The server requires clients from this IP address to authenticate with a registered nickname and password.
<-: irc.d.com NOTICE test: Please reconnect using SASL, or authenticate now by typing: / QUOTE AUTH nick: password
: irc.d.com 465 test: NoSASL G-Lined: indésirable
TagsNo tags attached.
3rd party modules

Activities

syzop

2021-09-26 18:57

administrator   ~0022132

Last edited: 2021-09-26 19:03

I am not so sure if sending 465 is a good idea. Although it not written as such in the specification, it normally means the user is banned, cannot connect and the connection will be closed, and in this case it is only partially true.

The reason is shown, as in your example on the first line:
<-: irc.d.com NOTICE test: unwanted

But I guess you want it to be prominent, more clear, that "unwanted" is the reason?

PeGaSuS

2021-09-26 19:08

reporter   ~0022133

Possible idea: make $bantype and $banreason to be usable inside the set::authentication-prompt::message and make it to default to something like:
set::authentication-prompt::message "$bantype: $banreason - The server requires clients from this IP address to authenticate with a registered nickname and password.";

Cheers

syzop

2021-09-26 19:14

administrator   ~0022134

Last edited: 2021-09-26 19:14

Yeah I agree, we can expose a few variables there and set some better default.

PeGaSuS

2021-09-26 19:14

reporter   ~0022135

Or since ban messages can be quite large, something like:
set {
    authentication-prompt {
        /* Enabled or not? */
        enabled yes;

        message "$bantype: $banreason";
        message "The server requires clients from this IP address to authenticate with a registered nickname and password.";
        message "Please reconnect using SASL, or authenticate now by typing: /QUOTE AUTH nick:password";
    }
}

Cheers

armyn

2021-09-26 20:49

reporter   ~0022136

@Syzop :
> The reason is shown, as in your example on the first line:
> <-: irc.d.com NOTICE test: unwanted
> But I guess you want it to be prominent, more clear, that "unwanted" is the reason?

yes it's a translation error, it's "indésirable", not unwanted. I also modified the "irc.d.com" instead of putting my site, I did not pay attention for the "unwanted" which is the English translation of "indésirable"


For the
message "$bantype: $banreason";
$bantype and $banreason could I use them on the next unrealircd release?

In this case, if the 465 is detected, it is possible to activate something like:

if ( $bantype == 465 ) {
<-: irc.d.com 465 test: You are not welcome on this network. G-Lined: $banreason. Email [email protected] for more information.
}

that would be great

or create an option in authentication-prompt which would be:
display-465: yes;

syzop

2023-03-17 14:32

administrator   ~0022771

As mentioned previously I don't think we should send 465 (see my first comment in this bug), although I understand some other peoples views on this.

I just now added support for https://ircv3.net/specs/extensions/standard-replies. This gives us the ability to send "ACCOUNT_REQUIRED" (see https://ircv3.net/registry#fail-codes" ). The meaning of the code is mentioned there: "Indicates that the client’s connection cannot proceed for lack of SASL authentication "

https://github.com/unrealircd/unrealircd/commit/45757da12e61fa593047d051a45c943c9179bcf0
and https://github.com/unrealircd/unrealircd/commit/96a6cf03a1900654633476b7c069f28547c3b85f

commit 45757da12e61fa593047d051a45c943c9179bcf0
Author: Bram Matthys <[email protected]>
Date: Fri Mar 17 14:20:02 2023 +0100

    Add CAP standard-replies, and send ACCOUNT_REQUIRED_TO_CONNECT when
    a user is soft-banned, from authprompt anyway.

Issue History

Date Modified Username Field Change
2021-09-26 17:53 armyn New Issue
2021-09-26 18:57 syzop Note Added: 0022132
2021-09-26 19:03 syzop Note Edited: 0022132
2021-09-26 19:08 PeGaSuS Note Added: 0022133
2021-09-26 19:14 syzop Note Added: 0022134
2021-09-26 19:14 syzop Assigned To => syzop
2021-09-26 19:14 syzop Status new => acknowledged
2021-09-26 19:14 syzop Note Edited: 0022134
2021-09-26 19:14 PeGaSuS Note Added: 0022135
2021-09-26 20:49 armyn Note Added: 0022136
2023-03-17 14:25 syzop Status acknowledged => resolved
2023-03-17 14:25 syzop Resolution open => fixed
2023-03-17 14:25 syzop Fixed in Version => 6.0.7
2023-03-17 14:32 syzop Note Added: 0022771