Slodge has posted a a C# code sample to change DNN’s password generation -which uses the asp.net membership provider- to be less secure (of course he means just less complicated). To increase the length of my post I am including the VB version. *grin*
1: Public Class SlodgeDNNMembershipProvider
2: Inherits DotNetNuke.Security.Membership.AspNetMembershipProvider
3:
4: Shared PasswordBase As New List(Of String)() {"fishfinger", "rabbit","racing"}
5:
6: Public Overrides Function GeneratePassword(ByVal length As Integer) As String
7: ' length ignored - hope this does not hurt the SQL layer!
8: Return GeneratePassword()
9: End Function
10:
11: Public Overrides Function GeneratePassword() As String
12: Dim r As New Random()
13: Dim index As Integer = r.Next(PasswordBase.Count)
14: If index >= PasswordBase.Count Then
15: 'according to the intellisense help this should not happen
16: index = PasswordBase.Count - 1
17: End If
18: Dim number As Integer = r.Next(100)
19: Return String.Format("{0}{1:00}", PasswordBase(index), number)
20: End Function
21:
22: End Class