irctest.server_tests.chmodes.key

Channel key (RFC 1459, RFC 2812, Modern)

KeyTestCase

bahamut
charybdis
ergo
hybrid
inspircd
irc2
ircu2
nefarious
ngircd
plexus4
sable
solanum
unrealircd
unrealircd-5
testKeyNormal..............
testKeyValidation[empty]
key = 1*23( %x01-05 / %x07-08 / %x0C / %x0E-1F / %x21-7F )

; any 7-bit US_ASCII character, ; except NUL, CR, LF, FF, h/v TABs, and " "

-- https://tools.ietf.org/html/rfc2812#page-8

"Servers may validate the value (eg. to forbid spaces, as they make it harder to use the key in JOIN messages). If the value is invalid, they SHOULD return [ERR_INVALIDMODEPARAM](#errinvalidmodeparam-696). However, clients MUST be able to handle any of the following:

  • [ERR_INVALIDMODEPARAM](#errinvalidmodeparam-696)

  • [ERR_INVALIDKEY](#errinvalidkey-525)

  • MODE echoed with a different key (eg. truncated or stripped of invalid characters)

  • the key changed ignored, and no MODE echoed if no other mode change was valid.

" -- https://modern.ircdocs.horse/#key-channel-mode -- https://github.com/ircdocs/modern-irc/pull/111

......XXX.....
testKeyValidation[long]
key = 1*23( %x01-05 / %x07-08 / %x0C / %x0E-1F / %x21-7F )

; any 7-bit US_ASCII character, ; except NUL, CR, LF, FF, h/v TABs, and " "

-- https://tools.ietf.org/html/rfc2812#page-8

"Servers may validate the value (eg. to forbid spaces, as they make it harder to use the key in JOIN messages). If the value is invalid, they SHOULD return [ERR_INVALIDMODEPARAM](#errinvalidmodeparam-696). However, clients MUST be able to handle any of the following:

  • [ERR_INVALIDMODEPARAM](#errinvalidmodeparam-696)

  • [ERR_INVALIDKEY](#errinvalidkey-525)

  • MODE echoed with a different key (eg. truncated or stripped of invalid characters)

  • the key changed ignored, and no MODE echoed if no other mode change was valid.

" -- https://modern.ircdocs.horse/#key-channel-mode -- https://github.com/ircdocs/modern-irc/pull/111

..............
testKeyValidation[only-space]
key = 1*23( %x01-05 / %x07-08 / %x0C / %x0E-1F / %x21-7F )

; any 7-bit US_ASCII character, ; except NUL, CR, LF, FF, h/v TABs, and " "

-- https://tools.ietf.org/html/rfc2812#page-8

"Servers may validate the value (eg. to forbid spaces, as they make it harder to use the key in JOIN messages). If the value is invalid, they SHOULD return [ERR_INVALIDMODEPARAM](#errinvalidmodeparam-696). However, clients MUST be able to handle any of the following:

  • [ERR_INVALIDMODEPARAM](#errinvalidmodeparam-696)

  • [ERR_INVALIDKEY](#errinvalidkey-525)

  • MODE echoed with a different key (eg. truncated or stripped of invalid characters)

  • the key changed ignored, and no MODE echoed if no other mode change was valid.

" -- https://modern.ircdocs.horse/#key-channel-mode -- https://github.com/ircdocs/modern-irc/pull/111

.....X..X.....
testKeyValidation[spaces]
key = 1*23( %x01-05 / %x07-08 / %x0C / %x0E-1F / %x21-7F )

; any 7-bit US_ASCII character, ; except NUL, CR, LF, FF, h/v TABs, and " "

-- https://tools.ietf.org/html/rfc2812#page-8

"Servers may validate the value (eg. to forbid spaces, as they make it harder to use the key in JOIN messages). If the value is invalid, they SHOULD return [ERR_INVALIDMODEPARAM](#errinvalidmodeparam-696). However, clients MUST be able to handle any of the following:

  • [ERR_INVALIDMODEPARAM](#errinvalidmodeparam-696)

  • [ERR_INVALIDKEY](#errinvalidkey-525)

  • MODE echoed with a different key (eg. truncated or stripped of invalid characters)

  • the key changed ignored, and no MODE echoed if no other mode change was valid.

" -- https://modern.ircdocs.horse/#key-channel-mode -- https://github.com/ircdocs/modern-irc/pull/111

........X.....