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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Unable to persist cookies sitewide.
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Brainiac
Starting Member

USA
24 Posts

Posted - 02 December 2003 :  14:15:28  Show Profile  Visit Brainiac's Homepage  Send Brainiac an ICQ Message
I have a content management site that I wrote in asp that I have integrated (database and all) the Snitz forums into. The main changes I made were to my users table. I converted it over to the FORUM_MEMBERS table so that both applications could share the same user base and the user only needs to login once. For instance, you visit www.mydomain.com and login and when you eventually migrate to the forum, you are already logged in.

I can't get this to work, however. I have yet to be able to save a cookie that the forum will recognize in any way. Can someone help me on this?

NOTE: Yes, I did set the cookies to persist sitewide in the admin section.

Abashed the Devil stood and felt how awful goodness is.

Edited by - ruirib on 02 December 2003 15:00:04

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 02 December 2003 :  14:59:40  Show Profile  Send ruirib a Yahoo! Message
Did you change the DoCookies function?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Brainiac
Starting Member

USA
24 Posts

Posted - 02 December 2003 :  15:19:59  Show Profile  Visit Brainiac's Homepage  Send Brainiac an ICQ Message
Not one bit.

Abashed the Devil stood and felt how awful goodness is.
Go to Top of Page

Brainiac
Starting Member

USA
24 Posts

Posted - 02 December 2003 :  15:32:12  Show Profile  Visit Brainiac's Homepage  Send Brainiac an ICQ Message
Ok, so I'm searching through the files in an attempt to reassemble this and it's making me wish I had chosen to write it myself. ;) You had to know that was coming.

So I guess what I'm trying to do is allow the user to login to my site and stay that way whether they browse to the forum or not (once they are registered, of course). If they are not logged in: On submit, I post the username/pass to my process page. It's here that I'll want to generate a cookie for the forum to be able recogize and keep the user logged in.

However, I also want the user to be 'logged in' if they still have a valid cookie (in this case, let's call it 'always logged in'). So it's a low maintenance site, smart site, whatever you want to call it. So far, I've generated about 50 cookies with a very large variety of names and not one of them is working.

Abashed the Devil stood and felt how awful goodness is.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 02 December 2003 :  18:34:42  Show Profile  Send ruirib a Yahoo! Message
You have generated the cookie the same way as doCookies does it?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Brainiac
Starting Member

USA
24 Posts

Posted - 03 December 2003 :  08:19:51  Show Profile  Visit Brainiac's Homepage  Send Brainiac an ICQ Message
I believe so. Is there a way to craft the cookie to be compatible with both parts of the site? If so, how? Yes, I have tried calling doCookies as well as writing my own out.

I am stuck on this one little thing that is actually a huge deal, if you think about it. My users don't know if they are coming or going due to the separate logins.

Abashed the Devil stood and felt how awful goodness is.
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 03 December 2003 :  09:12:43  Show Profile  Visit Gremlin's Homepage
Post the cookie your creating, perhaps we can see something wrong with it. What path is the cookie being saved too ? "/" ?

Karens Cookie viewer is quite handy when using cookies

http://www.spychecker.com/program/wmcookie.html

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

Brainiac
Starting Member

USA
24 Posts

Posted - 03 December 2003 :  10:11:38  Show Profile  Visit Brainiac's Homepage  Send Brainiac an ICQ Message
Well, as you can probably tell, I'm having an issue even trying to figure out how to approach the problem. In the past, I have never had an issue like this when using cookies. It was always rather straight forward.

I'll see what I can generate to put up here.

Abashed the Devil stood and felt how awful goodness is.
Go to Top of Page

Brainiac
Starting Member

USA
24 Posts

Posted - 03 December 2003 :  11:58:59  Show Profile  Visit Brainiac's Homepage  Send Brainiac an ICQ Message
Ok, this isn't working. The snitz generated cookie has a bunch of encoded information in it. Mine doesn't. I can't compare the two because they are so different. And I have been using notepad to view them.

What do I need to include to be able to call doCookies externally?
config.asp
inc_func_common.asp
inc_header.asp

From there I can SET the cookie by calling doCookies. This only solves half the problem.

The other half is my site being able to read that cookie as well AND THEN that cookie containing all the data it needs for the seemless login, which isn't inserted by doCookies. I can probably alter doCookies enough to where I'm safe on MY end, but will I screw up the forum? In addition, where in the forum code does it actually CHECK for the cookie? I haven't been able to find it.

Abashed the Devil stood and felt how awful goodness is.
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 03 December 2003 :  19:16:16  Show Profile  Visit Gremlin's Homepage
quote:
The snitz generated cookie has a bunch of encoded information in it

Sounds like the password, when you save the password in the cookie it must first be run through the SHA256 function to encode it.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

Brainiac
Starting Member

USA
24 Posts

Posted - 04 December 2003 :  09:59:05  Show Profile  Visit Brainiac's Homepage  Send Brainiac an ICQ Message
Yes, I understand that it's the password.

I tried to create a work around by posting in the users username and login to default.asp with the method_type of login and it threw an error that said something to the effect that it couldn't find the database.

So if I save a cookie with that name/value key pair of Name=[some username]&Password=[some encrypted string] in addition to all the information that I want in that cookie, should this work?

Again, does anyone know where the forum checks for this cookie and validates it when a user visits?

Abashed the Devil stood and felt how awful goodness is.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 04 December 2003 :  10:36:53  Show Profile  Send ruirib a Yahoo! Message
I suggested that you took a look at the doCookies function in inc_func_common.asp. If you take a look, the username and password are stored in the cookie and the password is stored in its encrypted form. As such I see no reason for your surprise regarding this issue.

The forum checks the cookie in inc_header.asp.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Brainiac
Starting Member

USA
24 Posts

Posted - 08 December 2003 :  09:48:08  Show Profile  Visit Brainiac's Homepage  Send Brainiac an ICQ Message
Not to sling mud but ruirib, you did no such thing:

"Did you change the DoCookies function?"
"You have generated the cookie the same way as doCookies does it?"

Those are questions in response to my question(s). I understand the need for more information in a trouble shooting environment, but this hasn't been constructive.

I understand what is IN the cookie outputted by doCookies with one exception. The name (first instance of text in the cookie) comes across in a way I didn't expect. For instance, if I named my cookie Amazon in the config and then check my cookie upon logging in, I see: "AmazonstrSelectSize". Shouldn't matter if I am reading through my cookie using the Request.Cookies("Amazon") but then there are quite a few "shouldn't" situations in this world.

Now, I'll repeat, I have extended information that I need stored in that cookie. What I am doing is far more complex than I can reliably describe here, but the bare bones that I have presented (with some difficulty, yes), once solved, will be sufficient to clear up this mess. And believe me when I say that it's not for lack of trying on my part.

Alright, time to fight the dependency war on including header.asp outside of it's normal environment...

Abashed the Devil stood and felt how awful goodness is.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 08 December 2003 :  10:47:58  Show Profile  Send ruirib a Yahoo! Message
Ok, as I am obviously unable to help you, I'll stop trying. I apologize if I made you waste time and patience.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Brainiac
Starting Member

USA
24 Posts

Posted - 08 December 2003 :  11:18:46  Show Profile  Visit Brainiac's Homepage  Send Brainiac an ICQ Message
Wow. Grow some thicker skin. I wasn't angry/argumentative, just making a point. Now, if I wanted to critisize and be argumentative, I would start by mentioning how quickly and thouroughly a forum moderator dropped the ball on someone having difficulty not only expressing the issue, but looking to work with someone on understanding the problem in it's entirety.

I think it's a sad state of affairs that when a gauntlett is thrown, everyone retires meekly to their corners to assume the role of observer.

You haven't even tried my patience yet. And if I thought it were a waste of time, I wouldn't have tried to begin with.

And you haven't tried to help me, you've just asked questions and offered no advice to the situation.

I know it sounds confrontational, but believe me when I say this, I am only here in pursuit of fixing my problem, possibly helping others (where I can, I don't know this code base very well) and learning something new, not trolling or causing undue problems.

Now that you understand my motivation, can we get back to the issue at hand?

Abashed the Devil stood and felt how awful goodness is.
Go to Top of Page

ajhvdb
Junior Member

Netherlands
392 Posts

Posted - 08 December 2003 :  16:35:49  Show Profile
Search for a mod "universal login". I think you will get all the info you want from the posts related to this Mod.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07