[TYPO3-dev] Bug in typo3/index.php ?!

Kay Strobach typo3 at kay-strobach.de
Fri Nov 25 21:28:22 CET 2011


Hi,

an easy option for adding some js to the login form can be obtained from
EXT:easylogin ;)

Using that hook it's possible to implement a  mobile login form for the
TYPO3 Backend (in conjunction with a mobile backend, which uses other
hooks ...) - if i remember right.

Regards
Kay

Am 25.11.2011 16:02, schrieb Chris Zepernick:
> Hi Steffen,
> 
>> Did you do a blame on the line?
> nope
>> Check the revision, so that we know what context it is...
>> I could imagine it's done for RSAauth...
> yes it is but with the registered hook in mind the following is the
> called method:
> 
> /**
>  * Provides form code for the superchallenged authentication.
>  *
>  * @param    array    $params    Parameters to the script
>  * @param    SC_index    $pObj    Calling object
>  * @return    string    The code for the login form
>  */
> public function getLoginScripts(
>     array $params,
>     SC_index &$pObj
> ) {
> 
>     $content = '';
>     if ($pObj->loginSecurityLevel == 'superchallenged' ||
>         $pObj->loginSecurityLevel == 'challenged') {
>             $content = '
>                 <script type="text/javascript" src="md5.js"></script>
>                 ' . $GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
>                     function doChallengeResponse(superchallenged) {    //
>                         password = document.loginform.p_field.value;
>                         if (password)    {
>                             if (superchallenged)    {
>                                 password = MD5(password);    // this
> makes it superchallenged!!
>                             }
>                             str =
> document.loginform.username.value+":"+password+":"+document.loginform.challenge.value;
> 
>                             document.loginform.userident.value = MD5(str);
>                             document.loginform.p_field.value = "";
>                             return true;
>                         }
>                     }
>             ');
>         }
>         return $content;
> }
> 
> it makes no sense that the hook only works for the first occurence.
> the only thing it does is add some js, and it should be no problem if
> someone wants to add some additional code.
> 
> funny part is this only happens if mode is set to either superchallenged
> or challenged.
> 
> 
> so this only adds another method to js, and another script.
> 
> Cheers
> 
> Chris
> 


-- 
http://www.kay-strobach.de - Open Source Rocks

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org

Answere was usefull: https://flattr.com/profile/kaystrobach



More information about the TYPO3-dev mailing list