[Mono-bugs] [Bug 490042] New: EncryptPassword returns different results to ASP.NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Mar 29 13:31:17 EDT 2009


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


           Summary: EncryptPassword returns different results to ASP.NET
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i386
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: willisterman at googlemail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19

When calling encryptpassword within code, passing the same strings, the
returned encrypted string is not the same as when called by ASP.NET, which is
breaking authentication for my XMLMembershipProvider.






Reproducible: Always

Steps to Reproduce:
password=xikupjwn
<PasswordSalt>djBUmb9Cq6ayvO/8EGsjqw==</PasswordSalt>

byte[] bytes = Encoding.Unicode.GetBytes(password); 
byte[] src = Convert.FromBase64String(salt); 
byte[] dst = new byte[src.Length + bytes.Length]; 
byte[] inArray = null; 
Buffer.BlockCopy(src, 0, dst, 0, src.Length); 
Buffer.BlockCopy(bytes, 0, dst, src.Length, bytes.Length); 
inArray = this.EncryptPassword(dst); 
ret = Convert.ToBase64String(inArray);
Actual Results:  
ret = djBUmb9Cq6ayvO/8EGsjqy8sQB4jbPLI2/M9Ug/LEHXedb18LaSE97iECU8Guk3j

Expected Results:  
ret = mP2HHtZsSt5XTW//GTMi3GZCyd6GycdMer4IKHDOwyKHYcNOCWwHL9aEdxOColWH

The encrypted passwords are created by sqlmembershipprovider, and sqlmembership
authentication works in both ASP and mono, but after exporting the encrypted
password and salt to xml (to create a databaseless version of the website)
authentication only works in ASP, and fails in mono.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list