[Mono-dev] Blank characters in windows file names

Miguel de Icaza miguel at ximian.com
Mon Feb 19 10:58:58 EST 2007


Hello,

    I still do not like the idea of automatically trimming, because this
causes two different filenames to be available in the application: one
that is ultimately used in OS operations, and one that is used
internally.

    The issue in the past has been a source of security problems (see
the bug fix we had to issue for XSP: it was preciselly this case, one
two names for the same file).

    Which real-life cases expose this problem?

    Also, if you want to add code for Windows-only paths, do not call
IsRunningOnWindows 3 times, as each one requires an unmanaged
transition, instead call it once and store it in a local bool.

Miguel



More information about the Mono-devel-list mailing list