Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Fail if tag name and keywords is not within "printable ASCII"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:15

Johan Herland [off-list ref] writes:
Signed-off-by: Johan Herland <redacted>
---

On Sunday 10 June 2007, Junio C Hamano wrote:
quoted
"Alex Riesen" [off-list ref] writes:
quoted
And what is so special about 0x7f?
It is DEL, but as the code uses uchar, it probably also error on
0x80 or higher, if the intent is "printable ASCII".
Is this better?
I said "*if* the intent is to limit to printable ASCII".

It is still unclear what use cases the "keywords" need to
support (e.g. do we want to have "pick tags that have keyword
that matches this pattern"?  if so, what kind of pattern
language do we want to use?  Glob?  Regexp?  Would it be more
convenient if the keywords are treated case insensitively?  Is
there a useful use case if you are allowed to use people's names
as keywords?  Is it reasonable to assume that the keywords can
be split with a comma?  Do we want to allow a comma as part of
keywords?  If so, how would we quote a comma that is inside a
keyword?  etc.).  It depends on the answers to these questions
if "printable ASCII" is a good set.

As a general rule, if you make the initially allowed set of
values too wide, it gets _extremely_ hard to tighten it later.
So if we are to stick to printable ASCII (iow, "no people's
names or names of location as keywords"), I would even suggest
to limit the valid set further, say "^[-A-Za-z0-9_+.]+$", at
least initially.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help