Zum Inhalt springen

FE Passwort vergleich!!!

Erstellt am 6. Juli 2006 · 3 Antworten · letzte Antwort am 8. Juli 2006

Tags: felogin, Frontend-Benutzer, Frage

iwan ·

Wo wird das Passwort beim Einlogin im FE mir dem in der DB verglichen?

Und wo schreibt Typo3 die neuen fe_user in die Datenbank!?

Kann mir bitte da einer weiterhelfen! Bin schon am verzweifeln!

Mein Problem ist ich habe bereits eine gefüllte DB mir Passwort und username. Allerdings sind die Passwörter md5 und danach mit einer eigenen Funktion kodiert! Ich muß jetzt also die bestehenden Extension ...femd5pw.. so verändern dass meine Passwörter richtig kodiert werden!

#angry#

Ich danke euch jetzt schon

just2b ·

vielleicht hilft das:

> I made my own login form, but now when I login, kb_md5fepw messes with it,
> and I cannot disable it because registration still depends on it.
> So my question is, how exactly do I use it in my own extension? I couldn't
> find very much documentation on that, and looking at the newloginbox
> didn't answer my questions either.

You'll have to include the typo3/md5.js and the 'superchallenge_pass'
javascript function in your HTML header
--------
<script language="JavaScript" type="text/javascript" src="typo3/md5.js"></script><script type="text/javascript">
function superchallenge_pass(form) {
var pass = form.pass.value;
if (pass) {
var enc_pass = MD5(pass);
var str = form.user.value+":"+enc_pass+":"+form.challenge.value;
form.pass.value = MD5(str);
return true;
} else {
return false;
}
}
</script>
--------
Second add a challenge value to your form (you'll have to generate this with a USER_INT)
--------
temp.myform.20 = USER_INT
temp.myform.20.userFunc = user_mystuff->challenge_value
temp.myform.20.wrap = <input type="hidden" name="challenge" value="|" />
--------
class user_mystuff {
function challenge_value($content, $conf) {
$chal_val = md5(time().getmypid());
$res = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_kbmd5fepw_challenge', array('challenge' => $chal_val, 'tstamp' => time()));
return $this->cObj->stdWrap($chal_val, $conf);
}
}
--------
and then add an onsubmit handler to your <form> tag
--------
onsubmit="superchallenge_pass(this); return true;"
--------

lg georg