MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
     Site demo
IMPORTANT: Read THIS before posting your support question in the forum!
I'll be off-line until the second half of september, please do not insist asking support if there is nobody who can help you. The forum has the answers for almost all possible problems with MemHT Portal... use the search button and read documents! mem
Moderators: mem paulo89
Page 1/2 1 2 >
RSSReply
Admin Security - How Does It Work and How Long For
AuthorText
Docwyatt2001
Developer
Avatar

Posts: 87
Gender: _MALE_
Online: No

Version: 3.7.5
Country: Australia
Date: 19/05/2008 14:56
Admin Security - How Does It Work and How Long For
#post7223
I've been tweaking some of the addons for some security/visibility changes and have come across something.

I have installed the User Mod from this site - the more detailed block. One of the things I didn't like about it was the fact that it showed things like IP and last 5 users regardless of user level - guest, etc. So I added a simple isRank check in a few places to hide certain parts unless they were at least a user.

I logged out of the site, but forgot to log out as admin - I just closed the page. When I revisted the front page, the admin was still effectively logged in, althought I hadn't, so details were being shown. Smile

Is the admin login based on a cookie, or a database table entry? And if so, does this entry age - like a cookie expiry?
"Where is my damn coffee!!!"
Delete Edit Quote
 
freaky
Crazy Member
Avatar

Posts: 437
Contributes: 262

Gender: _MALE_
Online: No

Version: 3.8.5
Country: Swiss
Languages: English,French,German
Date: 20/05/2008 09:43
Re: Admin Security - How Does It Work and How Long For
#post7234
HI Docwyatt2001

I guess it work's with cookies and yes they expire (see image below)


Image

hope it will help you Smile

Peace
Freakyyy
Edited: 20/05/2008 09:46
"Don't Talk about It, Be about it! PEACE" - Mos Def

Mem is a winner so making him win go and vote -- here and here. Help mem and the howl Memht community.
Delete Edit Quote
 
Docwyatt2001
Developer
Avatar

Posts: 87
Gender: _MALE_
Online: No

Version: 3.7.5
Country: Australia
Date: 20/05/2008 10:22
Re: Admin Security - How Does It Work and How Long For
#post7236
Hopefully yeah... I will need to look a bit further now that I know what I'm looking for....

Does that cookie have an expiry date and time?

EDIT: I should look closer at the image next time... Smile
Edited: 20/05/2008 10:47
"Where is my damn coffee!!!"
Delete Edit Quote
 
freaky
Crazy Member
Avatar

Posts: 437
Contributes: 262

Gender: _MALE_
Online: No

Version: 3.8.5
Country: Swiss
Languages: English,French,German
Date: 20/05/2008 10:39
Re: Admin Security - How Does It Work and How Long For
#post7237
I just think 7days is maybe alot!! I would of set this to 24hours or 12hours! would this be actually usefull to set tthe expire date to 48 hours or 24 hours ??
Edited: 20/05/2008 10:41
"Don't Talk about It, Be about it! PEACE" - Mos Def

Mem is a winner so making him win go and vote -- here and here. Help mem and the howl Memht community.
Delete Edit Quote
 
Docwyatt2001
Developer
Avatar

Posts: 87
Gender: _MALE_
Online: No

Version: 3.7.5
Country: Australia
Date: 20/05/2008 10:46
Re: Admin Security - How Does It Work and How Long For
#post7240
I was thinking less... 1 hour tops... But I was thinking the logic should change a bit. Every time the admin access a page, the cookie should be updated for T+1hr. But that doesn't help with the original issue. You can log into the admin site, with out having to login to the normal user end. The admin stuff will still show up when you're not logged in... That's the bit I was concerned with.
"Where is my damn coffee!!!"
Delete Edit Quote
 
freaky
Crazy Member
Avatar

Posts: 437
Contributes: 262

Gender: _MALE_
Online: No

Version: 3.8.5
Country: Swiss
Languages: English,French,German
Date: 20/05/2008 11:05
Re: Admin Security - How Does It Work and How Long For
#post7242
mmm that thing with 1hours is maybe to much because if a admin is editing a New post and maybe he will have more than 1hours and then what happens?? he will have to log back in when hi finished and presses ok or Submit. I think you should set the cookie expiration at 10hours or 12hours. I mean a Admin has a big responsibility like changing his Password frequantly, make a hard Password ect. and an other big responsibility is login him self out when his finished doing his thing. Or am I totally wrong! And the Admin and User Interface works totally differently and not depending from itch other! That is then a good solution against session injection and all different types of attack !! Correct me if I am tottaly wrong Smile
Edited: 20/05/2008 11:07
"Don't Talk about It, Be about it! PEACE" - Mos Def

Mem is a winner so making him win go and vote -- here and here. Help mem and the howl Memht community.
Delete Edit Quote
 
Docwyatt2001
Developer
Avatar

Posts: 87
Gender: _MALE_
Online: No

Version: 3.7.5
Country: Australia
Date: 20/05/2008 11:25
Re: Admin Security - How Does It Work and How Long For
#post7244
If you "touch" the cookie on each page load... So that time is always reset to an hour later than the current time, so he will never have that issue. If it takes more than hour to make a change for a single thing, that's a bit worrying. You could make that a site setting for the admin... 1 hour, 2 hours, 8 hours, 1 day, never...

You could add a onClose to the page that checks if they are admin, and if so, delete the cookie. Removes the onus of logging out - lazy I know, but a saftey thing. Some of these things maybe implemented, I didn't look at the code.

I understand the two are seperate, and one would hope so. I guess I could be paranoid. I just don't think admin details should be seen on the normal pages unless the admin is logged into both the admin console and the actual website.
"Where is my damn coffee!!!"
Delete Edit Quote
 
freaky
Crazy Member
Avatar

Posts: 437
Contributes: 262

Gender: _MALE_
Online: No

Version: 3.8.5
Country: Swiss
Languages: English,French,German
Date: 20/05/2008 11:44
Re: Admin Security - How Does It Work and How Long For
#post7245
OK that isn't a bad idea, with the admin setting. mm just one thing the admin details are only gonna be shown on your computer for example: you go on the site log your self on the Admin panel and then it will compare your IP with the all the User on your site if it matches it will display the box with the special details!! maybe you could solve the problem by comparing IP's, I hope my way of thinking isn't stupid Smile but maybe if you would save your current IP (admin logged in) in your DB your could compare like every 5min if the IP is still on the site logged or simply on the site if not disable the cookie :S... Correct me If somethings impossible or stupidSmile
Edited: 20/05/2008 11:55
"Don't Talk about It, Be about it! PEACE" - Mos Def

Mem is a winner so making him win go and vote -- here and here. Help mem and the howl Memht community.
Delete Edit Quote
 
Docwyatt2001
Developer
Avatar

Posts: 87
Gender: _MALE_
Online: No

Version: 3.7.5
Country: Australia
Date: 20/05/2008 11:57
Re: Admin Security - How Does It Work and How Long For
#post7246
I was thinking of a shared machine.... If I logged in as admin, and forgot to log out and left the machine, and then someone else uses that machine, they will have access to the admin functions on the user side for the duration of the cookie.

Something for me to ponder more over I think... Thanks for the feedback though.
"Where is my damn coffee!!!"
Delete Edit Quote
 
freaky
Crazy Member
Avatar

Posts: 437
Contributes: 262

Gender: _MALE_
Online: No

Version: 3.8.5
Country: Swiss
Languages: English,French,German
Date: 20/05/2008 12:06
Re: Admin Security - How Does It Work and How Long For
#post7247
yes you are right but maybe you could solve this problem by saving IP's and comparing if his only or not!

because when you log in as admin you will have for example the following IP: 874.231.66.2;
user IP: 874.231.66.2;

like you see the User and admin IP matches and then it will show the admin box on the user with the same IP. and youcould extend this by maybe saving the admin's IP and comparing with all the Ip's logged on the site if you find a IP's that matches you could like update the cookie and it will set him self back to one hour and if the IP isn't wasn't found you could disable the last cookie or just let it be and after a hour it will desable it selfSmile.

I don't know if it's logical but It's the way I would Try to do this Smile
or is this a stupid idea Smile
Edited: 20/05/2008 12:08
Reason: Correction
"Don't Talk about It, Be about it! PEACE" - Mos Def

Mem is a winner so making him win go and vote -- here and here. Help mem and the howl Memht community.
Delete Edit Quote
 
Reply
Page 1/2 1 2 >
Survey
Which PHP version do you use?
PHP 5
PHP 4
Other (comment)
Language
Quotes
"This is by far the best freeware cms that i ever come across, my compliments to all of the staff"
marc58
CMS Award
Search
Users Block
Hi Guest
IP: 38.103.63.60

Username
Password
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo
Disclaimer and Privacy Policy - Newsletter
MemHT - MemHT - Miltenovik
- Miltenovic - ScripTips