![]() |
admincp: Extra Security (htaccess)
1 Attachment(s)
First of all: this isn?t my mod. I?have this one on my forums now for 4 or 5 years and was looking around here at vb.org for it but it seems it?s gone (or may be it never was released here). Yet, I haven?t found it so I tested this in vb4 and it works. Guess it?s quite useful for some of you so I share this with you.
This mod adds some extra security to your admincp. And your admincp only. The modcp remains untouched, so mods can access the modcp without a secondary login. Files to edit: 1 Install time: 1 minute Open admincp/index.php on your server. Above: PHP Code:
PHP Code:
If the original author is still around hit me back so you can release this one under your name. |
Weird but funny... :) I?ve found the original mod in the "Similiar Mod" section at the moment my post was published. It?s in the graveyard, huh? Guess thats the reason I hadn?t found it through the search engine before? So, all credits to SolidSnake@GTI. His original mod can be found here: https://vborg.vbsupport.ru/showthread.php?t=105179 .
|
toooo goood man thanks so much
|
Savage man, cheers for that
|
If I have more then 1 administrator?
I have 3 admin. |
Quote:
|
Well this is not true .htaccess because it's being used in the php file. If you want multiple logins look at http://www.javascriptkit.com/howto/htaccess3.shtml that should give you a idea for security. There even scripts that can make the login and password on the fly and add it in the .htaccess file.
|
True. Therefor I said this Mod can?t handle mutliple logins ;)
|
Thanks u so much marv :)
Marv can u give code for mod cp also it will be really great :) |
Quote:
|
Working thanks :)
|
No need for a file edit for the admincp
There is a hook that could be used ;) PHP Code:
|
Quote:
|
Cool :) Good addition; HolyKiller !
|
Quote:
also will this mod work if i have changed my admincp name? thanks |
Another easy way to do this is just create two files one called .htaccess one called .htpasswd
In .htaccess put the following: AuthName "Password Required" AuthType Basic AuthUserFile /home/forums/.htpasswd <-- path to passwd file AuthGroupFile /dev/null require user JohnDoe <-- this is the user that will have access (case sensitive) require user JohnDoe2 <-- Add as many as users as you need using this format. in the .htpasswd file put the user name and the encrypted paswd in this format: JohnDoe:XPHPiphsU8rkM <--- examples only JohnDoe2:PRrJjeFUT5ZWg Use .htaccess / .htpasswd will give you a two step login that offers server side protect. Here is a link to a great how to on this plus it offers a tool for creating the encrypted passwords. http://www.javascriptkit.com/howto/htaccess.shtml |
Quote:
HERE |
Quote:
|
Another methos is;
find first and foremost <?php and add this to under PHP Code:
|
Very hand to have, thanks.
|
Very handy to have, thanks.
|
I only posted once? please Mods delete the other posts.
|
Quote:
1) depending on PHP's session.save_path value(php.ini) if this is set to a world readable/writable directory like "/tmp" for example it might be possible for unauthorized users to get something which doesn't belong to them.session.save_path should be set to a non world readable/writable directory outside off your webroot then and only then your sessions are secure 2) usage of $_POST values directly without any form of sanitazation this could open the door to XSS(Cross Site Scripting) holes you should use PHP Code:
|
All times are GMT. The time now is 07:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|