[AITW] Bypass EM password, as an option?

Want to share what MODs you've gotten to work with EM? Happy about all the time your're saving? Want to say "thanks"? Here's the place.
Forum rules
DO NOT give out any FTP passwords to anyone! There is no reason to do so! If you need help badly enough, create a temporary FTP account that is restricted to only the files that you need help with and give the information for that. Giving out FTP information can be very dangerous!
Locked
markus_petrux
Registered User
Posts: 376
Joined: Fri Jun 18, 2004 10:58 pm
Location: Girona, Catalunya (Spain)
Contact:

[AITW] Bypass EM password, as an option?

Post by markus_petrux »

For my test boards I always apply a little modification to EM so it doesn't require password.

I'm not sure if I found the hack somewhere or I wrote it. Here it is anyway:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_easymod.php
#
#-----[ FIND ]------------------------------------------
#
if ($get_password)
#
#-----[ BEFORE, ADD ]------------------------------------------
#
if( md5('') == get_em_pw() )
{
	$get_password = false;
	$password = '';
}
#
#-----[ FIND ]------------------------------------------
#
		'L_EM_INTRO' => $lang['EM_Intro'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
		'S_ACTION' => append_sid('admin_easymod.' . $phpEx),
Well, it bypasses the password prompt only if the password is empty.

I wonder if some sort of this could be added to a future version of EM. Maybe to make it more suitable, it could be added an option, so at installation time, the admin can mark a checkbox to confirm the "password panel bypass" whenever the password is set as empty.

:?:
Last edited by wGEric on Sun Jul 10, 2005 4:53 pm, edited 1 time in total.
selven
Registered User
Posts: 7
Joined: Thu May 22, 2003 10:43 am

Re: Bypass EM password, as an option?

Post by selven »

agree, is a great idea ;)
ChALkeR
Registered User
Posts: 176
Joined: Tue Mar 15, 2005 4:38 pm
Location: Russia

Re: Bypass EM password, as an option?

Post by ChALkeR »

this fix rules :D :D
Image
Sorry for my bad English....
User avatar
bonelifer
Community Team
Community Team
Posts: 114
Joined: Mon Jan 31, 2005 10:41 am

Re: Bypass EM password, as an option?

Post by bonelifer »

Thanks for this fix (err... mod) :D
markus_petrux
Registered User
Posts: 376
Joined: Fri Jun 18, 2004 10:58 pm
Location: Girona, Catalunya (Spain)
Contact:

Re: Bypass EM password, as an option?

Post by markus_petrux »

Hi!

I have updated the MOD posted in the topic starter. I forgot the second step, the FIND/AFTER ADD action.

This is necessary, otherwise the S_ACTION field of the forms in the MOD Install report is missing.


Cheers
User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

Re: Bypass EM password, as an option?

Post by Nux »

I would change one line of it to lower the load time a little:

Code: Select all

if( md5('') == get_em_pw() )
REPLACE WITH

Code: Select all

if( $get_password && md5('') == get_em_pw() )
This way PHP engine will check if the pass was needed at that point first and then check the password (if needed).
Locked