Author |
Topic |
|
Brachole
Starting Member
USA
33 Posts |
Posted - 18 April 2005 : 15:35:49
|
I have the forum in my website, but I actually have a different page that let's users register, which is not part of the Forum.
The password amd username is actually inserted into the "FORUM_MEMBERS" under "M_PASSWORD" & "M_USERNAME".
However, if you register through "register.asp" from the forum, the password inserted is encrypted.
How do I encrypt the password from my Registration Page?
Right now, whatever password the user picks, you can see it in the DB.
And when trying to log on using the password, it gives me invalid username and passowrd.
thanks. |
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Brachole
Starting Member
USA
33 Posts |
Posted - 19 April 2005 : 10:07:36
|
How would I include the function into my own asp registration page?
Also, do I need to change the names of my text fields and form name?
Thanks. |
|
|
Roger Fredriksson
Average Member
Sweden
556 Posts |
Posted - 19 April 2005 : 12:15:07
|
I did it this way for a new visitor on my own registration page: (make sure that strConnStrin is correct for your db)
<!--#INCLUDE FILE="inc_sha256.asp"--> <!-- METADATA TYPE="typelib" FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->
<% Dim objRS, intIDForNewRecord Set objRS = Server.CreateObject ("ADODB.Recordset") objRS.Open "Forum_Members", strConnString , adOpenStatic, adLockOptimistic, adCmdTable
objRS.MoveLast objRS.AddNew ' add a new record
.... strEncodedPassword = sha256("" & trim(objRS("M_NAME"))) objRS("M_Password") = strEncodedPassword objRS.Update .... objRS.Close Set objRS = Nothing .... %> |
rf/www.avgifter.com |
|
|
Brachole
Starting Member
USA
33 Posts |
Posted - 20 April 2005 : 10:37:03
|
I know this sounds silly, but is there a way to disable the encrypted password in the database?
The reason I'm asking is because I'm using my own html form to insert the username and password inot the Snitz DB.
However, it looks like it reads the actual password chosen by my user as encrypted when trying to log on to the forum.
Example, in my own html form, if the user choose the password "1234", it is then inserted as is into the DB.
But when the user tries to log on, it doesn't work...
If the only way is to import the sha function into my own registration page...I'm using ASP with Javascript, so the tip from Roger Fredriksson won't work...
thanks a bunch!
thanks. |
|
|
Podge
Support Moderator
Ireland
3775 Posts |
|
Brachole
Starting Member
USA
33 Posts |
Posted - 20 April 2005 : 11:52:43
|
hummm...could it be that the function is in VB Script and that my own page is in Javascript, whic doesn't work?
Maybe I should just create my own page in VBScript...what do you think? |
|
|
Podge
Support Moderator
Ireland
3775 Posts |
Posted - 20 April 2005 : 14:03:59
|
I haven't tested this but you can have two languages on the same asp page. inc_func_common.asp does it.
You can still include the sha function but you have to specify the language at the top of inc_sha256.asp e.g.
<script language="vbscript" runat="server"> ......inc_sha256.asp snipped code........ </script>
and put this at the top of your own asp page.
<script language="javascript1.2" runat="server">
.........then your javascript code...........
</script>
|
Podge.
The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)
My Mods: CAPTCHA Mod | GateKeeper Mod Tutorial: Enable subscriptions on your board
Warning: The post above or below may contain nuts. |
Edited by - Podge on 20 April 2005 14:04:27 |
|
|
|
Topic |
|