IP.Board 2.3: Auto-login to ACP
Started by Michael, Jun 13 2008 07:36 PM
17 replies to this topic
#1
Posted 13 June 2008 - 07:36 PM
This is the support topic for the tutorial Auto-login to ACP. Please post here if you have any questions or feedback.
#2
Posted 15 June 2008 - 12:42 PM
THANK YOU MICHAEL!!!
Nice Idea
Nice Idea
#3
Posted 20 June 2008 - 03:40 AM
Thank you very much Micheal
#4
Posted 20 June 2008 - 10:39 AM
It's interesting but some things didn't work such as Edit Member, SQL Toolbox...
#5
Posted 20 June 2008 - 11:46 AM
Yeah, I found that out too, since you're not actually 'logged in' you don't have any root admin priveleges.
Michael McCune - IPS Marketplace Moderator
My Stuff: My Forum · My Resources · My Tutorials
Contact Me: Email · Facebook · Twitter
My Stuff: My Forum · My Resources · My Tutorials
Contact Me: Email · Facebook · Twitter
#6
#7
Posted 20 June 2008 - 01:24 PM
Michael, on Jun 20 2008, 01:46 PM, said:
Yeah, I found that out too, since you're not actually 'logged in' you don't have any root admin priveleges.
My: Modifications · Tutorials · Twitter

#8
Posted 20 July 2008 - 01:07 AM
I just discovered another problem with this tutorial.
While in settings, the root admin will be removed from all group listings. It just caused me 30minutes of head scratching until I thought about this little edit that I did.
While in settings, the root admin will be removed from all group listings. It just caused me 30minutes of head scratching until I thought about this little edit that I did.
My: Modifications · Tutorials · Twitter

#9
Posted 20 July 2008 - 01:09 AM
I should probably just trash this then.
Michael McCune - IPS Marketplace Moderator
My Stuff: My Forum · My Resources · My Tutorials
Contact Me: Email · Facebook · Twitter
My Stuff: My Forum · My Resources · My Tutorials
Contact Me: Email · Facebook · Twitter
#10
Posted 20 July 2008 - 01:26 AM
Perhaps instead of trashing this mod you could simply change it so that you can easily add/remove some hard-coding in the appropriate file such that the login name (or e-mail) and password form fields are automatically populated and a submit is simulated via JavaScript?
Edited by GaryK, 20 July 2008 - 01:28 AM.
Alright! I know I'm in there! If I don't come out, I'll have to come in after me!
#11
Posted 20 July 2008 - 01:34 AM
Or just add this piece of code above the code found in tutorial.
if( ! $ipsclass->input['adsess'] )
{
$ipsclass->DB->build_query( array( 'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => 'm.id='.intval($_COOKIE[$ipsclass->vars['cookie_id'].'member_id']),
'add_join' => array( 0 => array(
'select' => 'g.*',
'from' => array( 'groups' => 'g' ),
'where' => 'g.g_id=m.mgroup',
'type' => 'left' ),
1 => array(
'select' => 'p.*',
'from' => array( 'admin_permission_rows' => 'p' ),
'where' => 'm.id=p.row_member_id',
'type' => 'left' )
)
) );
$ipsclass->DB->exec_query();
$mem = $ipsclass->DB->fetch_row();
$ipsclass->sess->member = $mem;
$ipsclass->sess->build_group_permissions();
$mem = $ipsclass->sess->member;
if ( $mem['g_access_cp'] != 1 )
{
die( "You do not have access to the administrative CP" );
}
else
{
$extra_query = "";
if ( $_POST['qstring'] )
{
$extra_query = urldecode( $_POST['qstring'] );
$extra_query = str_replace( "{$ipsclass->vars['board_url']}" , "" , $extra_query );
$extra_query = preg_replace( "!/?admin\.{$ipsclass->vars['php_ext']}!i", "" , $extra_query );
$extra_query = preg_replace( "!^\?!" , "" , $extra_query );
$extra_query = preg_replace( "!adsess=(\w){32}!" , "" , $extra_query );
$extra_query = preg_replace( "!s=(\w){32}!" , "" , $extra_query );
$extra_query = preg_replace( "!act=login!" , "" , $extra_query );
$extra_query = preg_replace( "!code=template-edit-bit!" , "" , $extra_query );
$extra_query = preg_replace( "!code=template-bits-list!" , "" , $extra_query );
$extra_query = preg_replace( "!bitname=(\w)!" , "" , $extra_query );
$extra_query = $ipsclass->parse_clean_value( $extra_query );
}
$ipsclass->DB->do_delete( 'admin_sessions', 'session_member_id='.$mem['id'] );
$sess_id = md5( uniqid( microtime() ) );
$ipsclass->DB->do_insert( 'admin_sessions', array (
'session_id' => $sess_id,
'session_ip_address' => $ipsclass->ip_address,
'session_member_name' => $mem['name'],
'session_member_id' => $mem['id'],
'session_member_login_key' => md5( $mem['joined'] . $mem['ip_address'] ),
'session_location' => 'index',
'session_log_in_time' => time(),
'session_running_time' => time(),
) );
$ipsclass->input['adsess'] = $sess_id;
$extra_query .= "&member_id=".$mem['id'].'&password=ok';
$ipsclass->admin->redirect( $ipsclass->vars['board_url'].'/'.IPB_ACP_DIRECTORY."/index.".$ipsclass->vars['php_ext']."?adsess=".$ipsclass->input['adsess']."&".$extra_query, '"Log In" Successful' );
exit();
}
}
It will at least give you some fake security. The only way for someone else to get in now, is to change their member_id cookie.
My: Modifications · Tutorials · Twitter

#12
Posted 25 July 2008 - 07:28 PM
Just bumping this in case you didn't see it
My: Modifications · Tutorials · Twitter

#13
Posted 25 July 2008 - 10:09 PM
m4rtin, on Jul 25 2008, 03:28 PM, said:
Just bumping this in case you didn't see it 
Please correct me if my above assumption is wrong.
Alright! I know I'm in there! If I don't come out, I'll have to come in after me!
#14
Posted 25 July 2008 - 10:40 PM
It is safe against the man in the street, but some leet hackers may find the solution to it.
Just put a .htaccess/.htpasswd lock on the folder, and you as safe as you'll ever be.
You can also ban everyone but yourself using .htaccess.
Just put a .htaccess/.htpasswd lock on the folder, and you as safe as you'll ever be.
You can also ban everyone but yourself using .htaccess.
order deny,allow deny from all allow from 127.0.0.1 allow from localhost
My: Modifications · Tutorials · Twitter

#15
Posted 25 July 2008 - 10:48 PM
I'll have to see if there's a Windows Server 2003 equivalent for that. Thanks for the tip.
Alright! I know I'm in there! If I don't come out, I'll have to come in after me!
#16
#17
Posted 25 July 2008 - 11:09 PM
m4rtin, on Jul 25 2008, 07:02 PM, said:
http://support.microsoft.com/kb/324064
Like that, maybe?
Like that, maybe?
Alright! I know I'm in there! If I don't come out, I'll have to come in after me!
#18
Posted 23 January 2009 - 07:06 PM
I did different Script, i created a file called admin/indice.php with the data of the admin/index.php - after I made the changes in admin/index.php
only in this part, so I put
Such as copies of old admin/index.php was admin/indice.php who always asks password - thought that the best message.
only in this part, so I put
{
die( "You do not have access to the administrative CP" );
}changed for{
header( 'Location: indice.php' );
}what will happen when the admin is not logged in will not get the message but the screen asking logon/passwordSuch as copies of old admin/index.php was admin/indice.php who always asks password - thought that the best message.
Edited by Londonms, 23 January 2009 - 07:29 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





Contributor












