[patch] actsync rejects hannover._wichtig
Julien ÉLIE
julien at trigofacile.com
Thu Mar 18 20:13:01 UTC 2010
Hi Florian,
> actsync rejects syncing newsgroups whose components start with '+', '-'
> or '_'. RFC5536 in section 3.1.4 states that these MUST be accepted by
> news servers (and innd does so), even though their use is reserved.
> Legacy group names such as hannover._wichtig are our current use case
> for this patch
OK, thanks for your patch.
I also changed another comment, arount line 1190:
- * A '.' is ok as long as the next character is alphanumeric.
+ * A '.' is ok as long as the next character is alphanumeric
+ * or '+', '-', '_'.
> Note that this does not fix the case where the hierarchy name starts
> with one of these characters, as I'm unaware of any such hierarchy. If
> needed, backends/actsync.c:1142 would need to be amended accordingly.
Are you sure newsgroups with such names are rejected?
I read:
/* must start with an alphanumeric ascii character */
if (!isascii(name[0])) {
return 1;
}
It is isascii() and not isalnum() -- discrepancy in the comment...
Incidentally, I do not understand well the part of the code you changed:
couldn't isascii(*(p+1)) be removed because of isalnum((int)*(p+1)) just
afterwards?
- if ((!num_chk || non_num) && isascii(*(p+1)) && isalnum((int)*(p+1))) {
+ if ((!num_chk || non_num) && isascii(*(p+1)) &&
+ (isalnum((int)*(p+1)) || *(p+1) == '+' || *(p+1) == '-' || *(p+1) == '_' )) {
> While looking around for how this is handled in other parts of INN, I
> wondered if newsgroups component syntax checking shouldn't be unified
> someplace?
It would be great, yes.
I will add your suggestion to our Trac.
> For example, actsync properly checks for all-numeric
> components, which would clash with tradspool article storage. A check in
> innd/cc.c:988 (CCnewgroup), which is supposedly trying to do the same,
> doesn't even catch 'ctlinnd newgroup 123.456.798'
One may wish to have such newsgroups in case he does not use tradspool.
It is only a SHOULD NOT in RFC 5536.
An newsgroup named microsoft.public.vb.6.webdevelopment exists in the
microsoft.* hierarchy.
--
Julien ÉLIE
« Plus un ordinateur possède de RAM, plus vite il peut générer un message d'erreur. »
More information about the inn-workers
mailing list