Author |
Topic |
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 08 December 2004 : 00:18:56
|
You don't need to install the older version of snitz. Once you have imported the username/passwords into the database, just run setup.asp and any passwords that haven't already been encrypted by the forum, will be. The encryption process sets FORUM_MEMBERS.M_SHA256 to 1, if that field isn't already 1, then the password for that record will be encrypted and the value of FORUM_MEMBERS.M_SHA256 will be updated to 1.
All you will need to do is to make sure that that field is not 1 already (as that is the default value for that field, and might get set when you import your usernames/passwords). Would probably be best to import an empty value to that field when you import your usernames/passwords. |
|
|
JLatiolait
Starting Member
12 Posts |
Posted - 08 December 2004 : 00:37:47
|
i'll give this a go in the next day or so and inform on results.
thanks, j |
|
|
JLatiolait
Starting Member
12 Posts |
Posted - 08 December 2004 : 16:58:51
|
results,
the password is NOT encrypted?
* installed snitz 3.4.05 * DTS transfered my external records to the FORUM_MEMBERS table * imported the M_SHA256 field as a blank * ran setup.asp * new records are there but PW is NOT encrypted? * status: M_SHA256 field is now blank and does not read Null (no change from before setup.asp run)
any ideas? is there documentation on this process somewhere... mabye there is a step missing?
Note: i have previously installed Universal Login and run the script that sets "Allow Zero Length" property in the snitz db to Yes. However, am i correct in thinking that this would not prevent the encryption process? |
Edited by - JLatiolait on 08 December 2004 17:45:00 |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 08 December 2004 : 19:27:00
|
sorry about that, I should have double checked the setup.asp file. It's looking for the value to be NULL, not empty.
Here is the actual code from setup.asp that performs this action: (starts on line #3280)
'## Encrypt existing Passwords
strSql = "SELECT MEMBER_ID, M_PASSWORD "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE (M_SHA256 IS NULL) "
strSql = strSql & " ORDER BY MEMBER_ID " What you could do, so you don't have to go in and change the values in the database, is change the code above to this:
'## Encrypt existing Passwords
strSql = "SELECT MEMBER_ID, M_PASSWORD "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE (M_SHA256 IS NULL) OR (M_SHA256 = '') "
strSql = strSql & " ORDER BY MEMBER_ID " I haven't tested it, but it should work. |
|
|
JLatiolait
Starting Member
12 Posts |
Posted - 08 December 2004 : 20:22:19
|
no prob., i appreciate the support. i'll give this a go again tommorrow and inform.
thanks again. |
Edited by - JLatiolait on 08 December 2004 20:25:57 |
|
|
JLatiolait
Starting Member
12 Posts |
Posted - 10 December 2004 : 16:02:43
|
i agree, it appears it should work - but it's NOT? i also tried going into the Access DB and inserting a record field value for M_SHA256 = 0 and strSql = strSql & " WHERE (M_SHA256 IS NULL) OR (M_SHA256 = 0) "
(Access won't let me insert NULL into the field / data type: number)
Note: i did not forget to save and upload my setup.asp file. Note: i also tried returning the name of the DB back to it's orignal name (snitz_forums_2000.mdb) setup.asp runs without problem...
* still no encrypted PW?
|
Edited by - JLatiolait on 10 December 2004 16:31:39 |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 10 December 2004 : 17:12:28
|
Try running an upgrade from version Snitz Forums 2000 Version 3.3.05 (i.e. choose Snitz Forums 2000 Version 3.3.05 in the dropdown box). |
|
|
JLatiolait
Starting Member
12 Posts |
Posted - 10 December 2004 : 17:39:04
|
this is what i got below. passwords did not encrypt... error encountered at bottom. =====================================================
Please Wait until the upgrade has been completed !
Noncritical error: M_MSN already existed in the MEMBERS table Noncritical error: M_KEY already existed in the MEMBERS table Noncritical error: M_NEWEMAIL already existed in the MEMBERS table Noncritical error: M_SHA256 already existed in the MEMBERS table Noncritical error: M_PWKEY already existed in the MEMBERS table Noncritical error: T_STICKY already existed in the TOPICS table Noncritical error: T_STICKY already existed in the A_TOPICS table Noncritical error: T_LAST_EDIT already existed in the TOPICS table Noncritical error: T_LAST_EDIT already existed in the A_TOPICS table Noncritical error: T_LAST_EDITBY already existed in the TOPICS table Noncritical error: T_LAST_EDITBY already existed in the A_TOPICS table Noncritical error: R_LAST_EDIT already existed in the REPLY table Noncritical error: R_LAST_EDIT already existed in the A_REPLY table Noncritical error: R_LAST_EDITBY already existed in the REPLY table Noncritical error: R_LAST_EDITBY already existed in the A_REPLY table Noncritical error: T_SIG already existed in the TOPICS table Noncritical error: T_SIG already existed in the A_TOPICS table Noncritical error: R_SIG already existed in the REPLY table Noncritical error: R_SIG already existed in the A_REPLY table Noncritical error: M_VIEW_SIG already existed in the MEMBERS table Noncritical error: F_DEFAULTDAYS already existed in the FORUM table Noncritical error: F_COUNT_M_POSTS already existed in the FORUM table Noncritical error: M_DOB already existed in the MEMBERS table Noncritical error: F_LAST_POST_TOPIC_ID already existed in the FORUM table Noncritical error: F_LAST_POST_REPLY_ID already existed in the FORUM table Noncritical error: T_LAST_POST_REPLY_ID already existed in the TOPICS table Noncritical error: T_LAST_POST_REPLY_ID already existed in the A_TOPICS table Noncritical error: T_UREPLIES already existed in the TOPICS table Noncritical error: T_UREPLIES already existed in the A_TOPICS table Noncritical error: M_SIG_DEFAULT already existed in the MEMBERS table Upgraded: F_DEFAULTDAYS field value updated in the FORUM table Upgraded: F_COUNT_M_POSTS field value updated in the FORUM table Upgraded: T_STICKY field value updated in the TOPICS table Upgraded: T_STICKY field value updated in the A_TOPICS table Upgraded: T_LAST_POST_REPLY_ID field value updated in the TOPICS table Upgraded: T_SIG field value updated in the TOPICS table Upgraded: T_SIG field value updated in the A_TOPICS table Upgraded: R_SIG field value updated in the REPLY table Upgraded: R_SIG field value updated in the A_REPLY table Upgraded: M_VIEW_SIG field value updated in the MEMBERS table Upgraded: M_SIG_DEFAULT field value updated in the MEMBERS table Upgraded: M_KEY Field Size has been changed Upgraded: M_PWKEY Field Size has been changed Upgraded: M_SIG Field has been changed Upgraded: M_COUNTRY Field Size has been changed Upgraded: M_HOMEPAGE Field Size has been changed Upgraded: M_PASSWORD Field Size has been changed Upgraded: F_DESCRIPTION Field has been changed Upgraded: Table MEMBERS_PENDING has been dropped Upgraded: Table MEMBERS_PENDING created Error: 80040E14 Table 'FORUM_GROUP_NAMES' already exists. strUpdateSql: CREATE TABLE FORUM_GROUP_NAMES ( GROUP_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , GROUP_NAME text (50) NULL , GROUP_DESCRIPTION text (255) NULL , GROUP_ICON text (255) NULL , GROUP_IMAGE text (255) NULL ) Error: 80040E14 Table 'FORUM_GROUPS' already exists. strUpdateSql: CREATE TABLE FORUM_GROUPS ( GROUP_KEY COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , GROUP_ID int NULL , GROUP_CATID int NULL ) Error: 80040E14 Table 'FORUM_NAMEFILTER' already exists. strUpdateSql: CREATE TABLE FORUM_NAMEFILTER ( N_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , N_NAME text (75) NULL ) Error: 80040E14 Table 'FORUM_BADWORDS' already exists. strUpdateSql: CREATE TABLE FORUM_BADWORDS ( B_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , B_BADWORD text (50) NULL , B_REPLACE text (50) NULL )
Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.
/shawnalladio/www/forum/setup.asp, line 3288
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 10 December 2004 : 18:01:16
|
go ahead and remove the M_SHA256 field from the MEMBERS table of the database and try it again. |
|
|
JLatiolait
Starting Member
12 Posts |
Posted - 10 December 2004 : 18:26:42
|
encrypted! so the process would be, delete the SHA256 field and do a database upgrade from 3.3.05
* final question - is this a "stable" solution?
i'm assuming the "noncritical errors" aren't a problem but what about the "updates" to the existing 3.5.4 database, etc.?
note: i did the 2nd database update, removing the SHA256 field, from the backed-up (original) database.
thanks again. ==============================================
Please Wait until the upgrade has been completed !
Noncritical error: M_MSN already existed in the MEMBERS table Noncritical error: M_KEY already existed in the MEMBERS table Noncritical error: M_NEWEMAIL already existed in the MEMBERS table Upgraded: M_SHA256 has been added to the MEMBERS table Noncritical error: M_PWKEY already existed in the MEMBERS table Noncritical error: T_STICKY already existed in the TOPICS table Noncritical error: T_STICKY already existed in the A_TOPICS table Noncritical error: T_LAST_EDIT already existed in the TOPICS table Noncritical error: T_LAST_EDIT already existed in the A_TOPICS table Noncritical error: T_LAST_EDITBY already existed in the TOPICS table Noncritical error: T_LAST_EDITBY already existed in the A_TOPICS table Noncritical error: R_LAST_EDIT already existed in the REPLY table Noncritical error: R_LAST_EDIT already existed in the A_REPLY table Noncritical error: R_LAST_EDITBY already existed in the REPLY table Noncritical error: R_LAST_EDITBY already existed in the A_REPLY table Noncritical error: T_SIG already existed in the TOPICS table Noncritical error: T_SIG already existed in the A_TOPICS table Noncritical error: R_SIG already existed in the REPLY table Noncritical error: R_SIG already existed in the A_REPLY table Noncritical error: M_VIEW_SIG already existed in the MEMBERS table Noncritical error: F_DEFAULTDAYS already existed in the FORUM table Noncritical error: F_COUNT_M_POSTS already existed in the FORUM table Noncritical error: M_DOB already existed in the MEMBERS table Noncritical error: F_LAST_POST_TOPIC_ID already existed in the FORUM table Noncritical error: F_LAST_POST_REPLY_ID already existed in the FORUM table Noncritical error: T_LAST_POST_REPLY_ID already existed in the TOPICS table Noncritical error: T_LAST_POST_REPLY_ID already existed in the A_TOPICS table Noncritical error: T_UREPLIES already existed in the TOPICS table Noncritical error: T_UREPLIES already existed in the A_TOPICS table Noncritical error: M_SIG_DEFAULT already existed in the MEMBERS table Upgraded: F_DEFAULTDAYS field value updated in the FORUM table Upgraded: F_COUNT_M_POSTS field value updated in the FORUM table Upgraded: T_STICKY field value updated in the TOPICS table Upgraded: T_STICKY field value updated in the A_TOPICS table Upgraded: T_LAST_POST_REPLY_ID field value updated in the TOPICS table Upgraded: T_SIG field value updated in the TOPICS table Upgraded: T_SIG field value updated in the A_TOPICS table Upgraded: R_SIG field value updated in the REPLY table Upgraded: R_SIG field value updated in the A_REPLY table Upgraded: M_VIEW_SIG field value updated in the MEMBERS table Upgraded: M_SIG_DEFAULT field value updated in the MEMBERS table Upgraded: M_KEY Field Size has been changed Upgraded: M_PWKEY Field Size has been changed Upgraded: M_SIG Field has been changed Upgraded: M_COUNTRY Field Size has been changed Upgraded: M_HOMEPAGE Field Size has been changed Upgraded: M_PASSWORD Field Size has been changed Upgraded: F_DESCRIPTION Field has been changed Upgraded: Table MEMBERS_PENDING has been dropped Upgraded: Table MEMBERS_PENDING created Error: 80040E14 Table 'FORUM_GROUP_NAMES' already exists. strUpdateSql: CREATE TABLE FORUM_GROUP_NAMES ( GROUP_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , GROUP_NAME text (50) NULL , GROUP_DESCRIPTION text (255) NULL , GROUP_ICON text (255) NULL , GROUP_IMAGE text (255) NULL ) Error: 80040E14 Table 'FORUM_GROUPS' already exists. strUpdateSql: CREATE TABLE FORUM_GROUPS ( GROUP_KEY COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , GROUP_ID int NULL , GROUP_CATID int NULL ) Error: 80040E14 Table 'FORUM_NAMEFILTER' already exists. strUpdateSql: CREATE TABLE FORUM_NAMEFILTER ( N_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , N_NAME text (75) NULL ) Error: 80040E14 Table 'FORUM_BADWORDS' already exists. strUpdateSql: CREATE TABLE FORUM_BADWORDS ( B_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , B_BADWORD text (50) NULL , B_REPLACE text (50) NULL ) Processing: Encrypting Existing Passwords (Please Wait...) .................................................................................................... (100 records processed) ..................................................... (153 total records processed) Upgraded: Existing Passwords Encrypted Upgraded: Added default values for new fields in CONFIG table Upgraded: Added default values for new fields in CONFIG table Upgraded: T_STICKY field value updated in the TOPICS table Upgraded: Added default values for new fields in CONFIG table Upgraded: Added default values for new fields in CONFIG table Upgraded: Added default values for new fields in CONFIG table
The Upgrade has been completed without errors !
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 10 December 2004 : 19:21:49
|
Yes it's stable. Doing upgrades from a previous version should not cause any adverse effects. The only thing I can see is if you have a lot of Pending Members, the upgrade process drops the Pending Members table and then re-adds it. So that would wipe out any pending members you may have, but they can just re-register.
You are correct about non-critical errors, they can be ignored. |
|
|
-gary
Development Team Member
406 Posts |
Posted - 13 December 2004 : 10:37:19
|
This works as long as a password isn't greater than 20 characters.
strSql = "select Member_ID, M_Password from forum_members"
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
Set rs = Server.CreateObject("ADODB.RecordSet")
Set rstemp = Server.CreateObject("ADODB.RecordSet")
rs.Open strSql, my_Conn, adOpenStatic
do while not rs.eof
if len(rs("M_Password")) < 20 then
strsql2 = "update forum_members set M_Password = '" & sha256("" & rs("M_Password")) & "' where Member_ID = " & rs("Member_ID")
rstemp.open strSql2, my_Conn, adOpenStatic
Response.Write "Updated " & rs("Member_ID") & ": " & rs("M_Password") & "<br>"
end if
rs.movenext
loop
|
KawiForums.com
|
|
|
Topic |
|