User:Stwalkerster/Notes on cloaks: Difference between revisions
Content deleted Content added
Stwalkersock (talk | contribs) ←Created page with '{{see also|m:IRC/Cloaks}} The documentation on Meta states: *{{tq|All cloaks must conform to the DNS hostname specification as described in RFC 1034 and RFC 1035. They may include upper- and lower-case Latin characters, Arabic numerals and dashes. They may not include spaces or underscores; hyphens should be used instead.}} *{{tq|Begin only with a letter and contain only DNS compliant characters a–z, A...' |
Stwalkersock (talk | contribs) m tweak |
||
Line 13: | Line 13: | ||
* Cloaks must contain at least one of <code>:</code>, <code>/</code>, <code>.</code><ref>https://github.com/atheme/atheme/blob/master/modules/protocol/solanum.c#L107</ref> |
* Cloaks must contain at least one of <code>:</code>, <code>/</code>, <code>.</code><ref>https://github.com/atheme/atheme/blob/master/modules/protocol/solanum.c#L107</ref> |
||
* Cloaks cannot be longer than 63 characters<ref>https://github.com/atheme/atheme/blob/master/libathemecore/services.c#L1244</ref><ref>https://github.com/atheme/atheme/blob/master/include/atheme/constants.h#L49</ref> |
* Cloaks cannot be longer than 63 characters<ref>https://github.com/atheme/atheme/blob/master/libathemecore/services.c#L1244</ref><ref>https://github.com/atheme/atheme/blob/master/include/atheme/constants.h#L49</ref> |
||
* The character after the '''''last''''' <code>/</code> cannot be a digit.<ref>https://github.com/atheme/atheme/blob/master/libathemecore/services.c#L1249-L1254</ref> This means <code>foo/bar/baz/3qux</code> is banned, but <code>foo/3/2/3/4/.</code> is allowed. (char after last / is not a digit). |
* The character after the '''''last''''' <code>/</code> cannot be a digit.<ref>https://github.com/atheme/atheme/blob/master/libathemecore/services.c#L1249-L1254</ref> This means <code>foo/bar/baz/3qux</code> is banned, but <code>foo/3/2/3/4/.</code> is technically allowed. (char after last / is not a digit). |
||
* The cloak can only contain characters a–z, A–Z, 0–9 and the hyphen (-)<ref>https://github.com/atheme/atheme/blob/master/modules/protocol/solanum.c#L94-L101</ref> |
* The cloak can only contain characters a–z, A–Z, 0–9 and the hyphen (-)<ref>https://github.com/atheme/atheme/blob/master/modules/protocol/solanum.c#L94-L101</ref> |
||
* The cloak cannot end in a trailing <code>/</code><ref>https://github.com/atheme/atheme/blob/master/modules/protocol/solanum.c#L103-L105</ref> |
* The cloak cannot end in a trailing <code>/</code><ref>https://github.com/atheme/atheme/blob/master/modules/protocol/solanum.c#L103-L105</ref> |
Revision as of 16:11, 7 June 2023
The documentation on Meta states:
All cloaks must conform to the DNS hostname specification as described in RFC 1034 and RFC 1035. They may include upper- and lower-case Latin characters, Arabic numerals and dashes. They may not include spaces or underscores; hyphens should be used instead.
Begin only with a letter and contain only DNS compliant characters a–z, A–Z, 0–9 and the hyphen (-)
However, this doesn't seem to paint the entire picture. This is what requirements actually seem to exist in the source code:
- Cloaks cannot be set on MARKed accounts (easily, can be overridden)[note 1]
- Cloaks cannot contain certain special characters (
@
,!
,?
,*
, space,'
,"
)[1] - Cloaks cannot be exactly
:
,/
,.
, or empty (NUL first byte) [2][3] - Cloaks cannot contain ASCII control chars (<32) [4][5]
- Cloaks must contain at least one of
:
,/
,.
[6] - Cloaks cannot be longer than 63 characters[7][8]
- The character after the last
/
cannot be a digit.[9] This meansfoo/bar/baz/3qux
is banned, butfoo/3/2/3/4/.
is technically allowed. (char after last / is not a digit). - The cloak can only contain characters a–z, A–Z, 0–9 and the hyphen (-)[10]
- The cloak cannot end in a trailing
/
[11]
Notes
- ^ This is a concern for staff, not GCs
Source code references
- ^ https://github.com/atheme/atheme/blob/master/libathemecore/services.c#L1236-L1239
- ^ https://github.com/atheme/atheme/blob/master/libathemecore/services.c#LL1238C25-L1238C54
- ^ https://github.com/atheme/atheme/blob/master/modules/protocol/solanum.c#L91-L92
- ^ https://github.com/atheme/atheme/blob/master/libathemecore/services.c#L1239
- ^ https://github.com/atheme/atheme/blob/master/libathemecore/function.c#L482-L493
- ^ https://github.com/atheme/atheme/blob/master/modules/protocol/solanum.c#L107
- ^ https://github.com/atheme/atheme/blob/master/libathemecore/services.c#L1244
- ^ https://github.com/atheme/atheme/blob/master/include/atheme/constants.h#L49
- ^ https://github.com/atheme/atheme/blob/master/libathemecore/services.c#L1249-L1254
- ^ https://github.com/atheme/atheme/blob/master/modules/protocol/solanum.c#L94-L101
- ^ https://github.com/atheme/atheme/blob/master/modules/protocol/solanum.c#L103-L105