The Project
|
News
|
Downloads
|
Mods
|
FAQ
|
Templates
|
Chat
|
Forum
BoardMod Support Forum
[
Home
|
Help
|
Search
|
Login
|
Register
]
07.09.10 at 21:47:02, Welcome, Guest. Please
Login
or
Register
Choose Language:
English
German
German_Du
BoardMod Support Forum
›
YaBB & BoardMod
›
Programming & Coding Board
› Cookies/Directories
(Moderators: LoonyPandora, Michael Prager, Shoeb Omar, BHRA Webmaster, Christer Alexander)
‹
Previous Topic
|
Next Topic
›
Pages: 1
Print
Cookies/Directories (Read 507 times)
Dave Rapp
Hacker Wannabe
Offline
Posts: 89
03.06.09 at 00:10:19
Lateley I feel like I'm trying to set a record for most questions asked. Anyway, In an admin section of a script I'm putting together I'm using cookies for admin login as follows:
sub write_cookie{
print "Content-type: text/html\n";
print "Set-Cookie: usname='$in{'username'}'; expires=''Thursday, 1-Jan-1970 12:00:00 GMT;';\n";
print "Set-Cookie: psword='$in{'userword'}'; expires=''Thursday, 1-Jan-1970 12:00:00 GMT;';\n";
print "Set-Cookie: rank='$ref->{'rank'}'; expires='Thursday, 1-Jan-1970 12:00:00 GMT;';\n\n";
}
The problem is, the cookies are being written from one directory and for each directory above that I want to enter I'm having to write a cookie for that directory also(log in again). Thiings are great once I've logged in to each directory(and have a cookie for each directory. Is there some way to write a cookie(am I missing an ingredient) so that if, say, the cookie is written in the /admin directory it will also be valid in, say /admin/processing directory? I log into admin dir but when I go to enter the processing dir it makes me write another cookie(log in again).
IP Logged
If you choose not to decide you still have made a choice.
deti
Fulltime Hacker
Offline
Posts: 101
Reply #1 -
03.06.09 at 08:30:33
Have you tryed with
path=/;
?
And what does the
;
here:
....expires='Thursday, 1-Jan-1970 12:00:00 GMT
;
';....
?
Why do you write 3 times
expires
and not all in one line?:
print "Set-Cookie: usname='$in{'username'}'; psword='$in{'userword'}'; rank='$ref->{'rank'}'; path=/; expires='Thursday, 1-Jan-1970 12:00:00 GMT';\n\r\n\r";
IP Logged
Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
Johann Wolfgang Goethe
Dave Rapp
Hacker Wannabe
Offline
Posts: 89
Reply #2 -
05.06.09 at 13:36:01
The biggest problem I had was the fact that the cookies weren't being read because of a goofup in the date format. Strange because they were showing up in Opera but that was it. I'm still trying to figure out what the deal is as far as reading the cookies is but it has to be in the login script---next victim of attack. BTW---I noticed at the end of the string for setting the cookies you had
\n\r\n\r
What are the r's for--never saw that one before. Thanx---have a nice day, Dave
«
Last Edit: 06.06.09 at 01:36:09 by Dave Rapp
»
IP Logged
If you choose not to decide you still have made a choice.
Pages: 1
Print
‹
Previous Topic
|
Next Topic
›
Forum Jump »
Home
» 10 most recent Posts
» 10 most recent Topics
YaBB & BoardMod
- News
- General Board
- Feedback
- Programming & Coding Board ««
YaBB 2 Mods
- FINAL Mods for YaBB 2.5
- BETA Mods for YaBB 2.5
- FINAL Mods for YaBB 2.4
- BETA Mods for YaBB 2.4
- FINAL Mods for YaBB 2.3/2.3.1
- BETA Mods for YaBB 2.3/2.3.1
- FINAL Mods for YaBB 2.2/2.2.1/2.2.2/2.2.3
- BETA Mods for YaBB 2.2/2.2.1/2.2.2/2.2.3
- FINAL Mods for YaBB 2/2.1
- BETA Mods for YaBB 2/2.1
YaBB 1 Mods
- FINAL Mods for YaBB 1 SP1.4
- FINAL Mods for YaBB 1 SP1.3/1.3.1/1.3.2
- FINAL Mods for YaBB 1 SP1.2
- FINAL Mods for YaBB 1 SP1/1.1
- BETA Mods for YaBB 1
Mod Support
- Mod Troubleshooting
- Mod Bugs
- Mod Ideas, Requests & Feedback
- Tutorials
- Mod Testing
Templates & Graphics
- Template Vault
- Template Help & Troubleshooting
- Template & Graphics Requests
- Graphics
- Showcase Board
BoardMod Support Forum
» Powered by
YaBB 2.3.1
!
YaBB
© 2000-2009. All Rights Reserved.
© 2000-2009 by
Michael Prager
- All rights reserved.
The Project
|
News
|
Downloads
|
Mods
|
FAQ
|
Templates
|
Chat
|
Forum