[PATCH] sanitize instead of rejecting mountpoints with funny characters

David Zeuthen david at fubar.dk
Mon Feb 27 11:27:37 PST 2006


On Mon, 2006-02-27 at 11:59 -0500, Bill Nottingham wrote:
> David Zeuthen (david at fubar.dk) said: 
> > So, I'd rather we precisely define what mount points are acceptable and
> > then the front-ends can replace invalid characters with underscores
> > themselves.. Right now I think we allow
> > 
> >  [:alnum:]_=[:space:]:.,+-
> > 
> > in the en_US.UTF-8 locale... That might change a bit when we rewrite
> > this stuff in C.. What do you think?
> 
> Probably should check for anything valid in the system locale
> (i.e., accept non-ascii UTF-8 in en_US.UTF-8)

So I nearly completed the rewrite of this helper in C yesterday... will
probably commit the code tomorrow night or earlier if I get time.

I think accepting anything that doesn't have G_DIR_SEPARATOR (e.g. '/')
is sound, yes? Or should we explicitly forbid more stuff?

    David




More information about the hal mailing list