https://bugzilla.novell.com/show_bug.cgi?id=374377


           Summary: [OSX] IsolatedStorageFile.CreateDirectory() can print
                    its local path on error
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: Other
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs@lists.ximian.com
        ReportedBy: [EMAIL PROTECTED]
         QAContact: mono-bugs@lists.ximian.com
                CC: [EMAIL PROTECTED]
          Found By: ---


The following code will result in printing local path for the isolated storage
(see error message in ipy below), which is not good for security:

using System;
using System.IO;
using System.IO.IsolatedStorage;

public class Test
{
        public static void Main ()
        {
                var a = IsolatedStorageFile.GetUserStoreForDomain ();
                a.CreateDirectory ("aaa");
                foreach (string s in a.GetDirectoryNames ("*"))
                        Console.WriteLine ("::: " + s);
                a.CreateDirectory ("aaa");
        }
}

The sample code above might be wrong; it is a translation from ipy to C# from
what I've heard from an OSX user guy:

>>> from System.IO import StreamWriter, StreamReader, FileMode
>>> from System.IO.IsolatedStorage import IsolatedStorageFile
>>> from System.IO.IsolatedStorage import IsolatedStorageFileStream
>>> a = IsolatedStorageFile.GetUserStoreForDomain()
>>> a.CreateDirectory('aaa')
>>> a.GetDirectoryNames("*")
System.String[]('aaa')
>>> a.CreateDirectory('aaa')
Traceback (most recent call last):
  File mscorlib, line unknown, in CreateDirectory
  File mscorlib, line unknown, in CreateSubdirectory
  File mscorlib, line unknown, in CreateDirectory
IOError: Cannot create
/Users/kki/.config/.isolated-storage/d.0A68C8AA4F5CAF994FEA.F763BEA021B19504664E/aaa
because a file with the same name already exists.
>>> 
>>> 
>>> 

Marking only open to employees, as it is possible security issue.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to