Skip to content

Conversation

@RyanSquared
Copy link
Contributor

It's been pointed out to me that servers often send an 908 numeric to
the client, but then also send an 904. When looking at this behavior, I
think this is so is because servers are generally built by default with
904 no matter what failed and then later, the 908 functionality is
implemented. In order to keep compatibility with clients that may not
understand the 908 numeric but do understand the 904 numeric as a
generic "retry". However, some clients do understand a 908 and use that
as a way to say "downgrade the mechanism and try again". So, they can
begin reconnecting as of the 908 numeric, but then get sent a 904
numeric, which some clients also take as a "try again" and do not
blindly consume the message.

The fix for the client would be to keep a state of which related
numerics are sent to the server, then begin the next attempt once the
904 numeric is received. This would still work with this proposed
change.

This also means that any numerics added in the future are compatible
with this specification, as the numerics will need to be sent before the
904 numeric which the client can use to restart the authentication with
any context sent from the other numerics.


I also noticed that there was only example of a "failed" case. I have
manually added one. I will be reattempting it sometime in the future to
get an actual response, I was just being really lazy busy writing
the example. I will also go attempt to get further examples of numerics
that are not currently covered by examples.

I do know the branch is called 804. It is a typo.

It's been pointed out to me that servers often send an 908 numeric to
the client, but then also send an 904. When looking at this behavior, I
think this is so is because servers are generally built by default with
904 no matter what failed and then later, the 908 functionality is
implemented. In order to keep compatibility with clients that may not
understand the 908 numeric but do understand the 904 numeric as a
generic "retry". However, some clients do understand a 908 and use that
as a way to say "downgrade the mechanism and try again". So, they can
begin reconnecting as of the 908 numeric, but then get sent a 904
numeric, which some clients also take as a "try again" and do not
blindly consume the message.

The fix for the client would be to keep a state of which related
numerics are sent to the server, then begin the next attempt once the
904 numeric is received. This would *still work* with this proposed
change.

This also means that any numerics added in the future are compatible
with this specification, as the numerics will need to be sent before the
904 numeric which the client can use to restart the authentication with
any context sent from the other numerics.

---

I also noticed that there was only example of a "failed" case. I have
manually added one. I will be reattempting it sometime in the future to
get an actual response, I was just being ~~really lazy~~ busy writing
the example. I will also go attempt to get further examples of numerics
that are not currently covered by examples.
@jwheare
Copy link
Member

jwheare commented Apr 22, 2020

First bit and example looks good. Actually had a bug around this in IRCCloud that I worked through with amdj/atheme a few months ago.

@RyanSquared
Copy link
Contributor Author

TODO split RPL_ and ERR_ into sections, rewrite to say that 904 should be sent in addition to RPL_ messages, NOT other ERR_ messages.

@jwheare jwheare added this to the Roadmap milestone Feb 16, 2021
@jwheare
Copy link
Member

jwheare commented Nov 2, 2021

@RyanSquared are you able to finish this up? If not we can try get someone else to take it over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants