Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Adding user from outside snitz (ASP.NET!)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dexterp37
Starting Member

7 Posts

Posted - 19 May 2005 :  15:01:04  Show Profile
Hello!

I hope this post fits in this section otherwise.. i'm very sorry :)

I just had to integrate snitz forum with an ASP.NET portal with the ability to add forum user from an outisde registration page (i'm using forum database as portal users database). The registration works ok, i just have a problem when authenticating with the forum.. it says my username or password are wrong!

I'm pretty sure password encryption is ok because i just ported the sha256 file to .NET and it produces same output as normal ASP function.
When registrating, i simply SHA the clear password and save it to the database along with username and email and other data.

Am I missing something?

Thanks in advance!

Podge
Support Moderator

Ireland
3776 Posts

Posted - 19 May 2005 :  15:07:22  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Are you sure that the passwords are encrypted the same? When I converted sha256 to .net I remember it wasn't as straight forward as I had hoped.

Can you post your sha function ?

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.
Go to Top of Page

Dexterp37
Starting Member

7 Posts

Posted - 19 May 2005 :  15:14:31  Show Profile
code removed by ruirib

Dexterp when posting long pieces of code, please do that as a link to a text file.

Edited by - ruirib on 21 May 2005 09:30:13
Go to Top of Page

Dexterp37
Starting Member

7 Posts

Posted - 19 May 2005 :  15:16:55  Show Profile
But i'm pretty sure this works just because i've checked password created .
Outputs are the same!
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 19 May 2005 :  15:31:41  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Ok.

This is simpler and it works.

    Public Function SHA256Hash(ByVal InputStr As String) As String
        Dim SHA256Hasher As New System.Security.Cryptography.SHA256Managed
        Return LCase$(ToHexString(SHA256Hasher.ComputeHash(Encoder.GetBytes(InputStr))))
    End Function

    Private Function ToHexString(ByVal ByteArray As Byte()) As String
        Dim i As Integer
        For i = LBound(ByteArray) To UBound(ByteArray)
            If Len(Hex(ByteArray(i))) = 1 Then
                ToHexString &= "0" & LCase$(Hex(ByteArray(i)))
            Else
                ToHexString &= LCase$(Hex(ByteArray(i)))
            End If
        Next
    End Function

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 19 May 2005 15:32:14
Go to Top of Page

Dexterp37
Starting Member

7 Posts

Posted - 21 May 2005 :  07:46:22  Show Profile
Still doesnt work :| Password generated from both methods are the same... i just add a new record to FORUM_MEMBERS table, is ther anything else to do?
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 21 May 2005 :  08:57:26  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Where is the forum?

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.
Go to Top of Page

Dexterp37
Starting Member

7 Posts

Posted - 24 May 2005 :  15:33:14  Show Profile
http://www.xcaso.it/forum !

User MUST register from www.xcaso.it/register.aspx and be able to browse forum w\o logging in again

Edited by - Dexterp37 on 24 May 2005 15:34:06
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 24 May 2005 :  15:54:43  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
It does work. Kind of. I signed up with First name Podge and Last name Podge

Your aspx page makes the username into "Podge Podge" (i.e. Firstname Lastname with a space in between) and doesn't use the Nickname as the username.

http://www.xcaso.it/forum/pop_profile.asp?mode=display&id=47

Are you combining fields to make the username ?

One bit of good news is that I was able to login using "Podge Podge" and the password I picked.

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.
Go to Top of Page

Dexterp37
Starting Member

7 Posts

Posted - 26 May 2005 :  15:26:18  Show Profile
weird! My query is so simple

// -> Build Query (dirty job)
string queryString = "INSERT INTO [FORUM_MEMBERS] "+
"([M_NAME]," +
"[M_USERNAME]," +
"[M_EMAIL], " +
"[M_PASSWORD]," +
"[M_CITY], " +
"[M_AGE], " +
"[M_SEX], " +
"[M_DATE], " +

"[M_PHOTO_URL]," +
"[M_BIO]) " +

"VALUES (" +
"'" + UserRName.Text + " " + Cognome.Text + "'," +
"'" + UserName.Text + "'," +
"'" + UserEmail.Text + "'," +
"'" + passResult + "'," +
"'" + City.Text + "'," +
"'" + sAge + "'," +
"'" + SexRadioList.SelectedItem.Value + "'," +
"'" + sBirthDay + "'," +
"'" + sPicUrl + "'," +
"'" + UserShortDesc.Text + "')";

Edited by - Dexterp37 on 26 May 2005 15:26:51
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 26 May 2005 :  15:43:57  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Its not weird, its exactly as you programmed it.

[M_NAME] gets set to "'" + UserRName.Text + " " + Cognome.Text + "'"

Unless I'm mistaken M_NAME is the field in the database which holds the forum username.

I'm not sure where M_USERNAME is used for but you can get by without it.


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 26 May 2005 15:45:24
Go to Top of Page

Dexterp37
Starting Member

7 Posts

Posted - 26 May 2005 :  16:07:03  Show Profile
**** :) So the field used for the login is M_NAME and not M_USERNAME? (confusing...)

So (just to be sure)
M_NAME -> Stores nickname used for login
M_USERNAME -> ?
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 26 May 2005 :  16:57:29  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
quote:
M_NAME -> Stores nickname used for login


Correct.

quote:
M_USERNAME


I don't know. I check the members table in my db and some of the records contain nulls so I guess you don't need to set it to anything as its not required.

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.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 27 May 2005 :  08:08:40  Show Profile
M_USERNAME is used to hold the login name when using NT authentication.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07