fixed syntax error

master
BodgeMaster 2020-02-23 22:26:00 +01:00
parent 8b18036ab3
commit bb54dda5f9
2 changed files with 13 additions and 9 deletions

View File

@ -23,10 +23,10 @@
<div class="item-2 round-border"> <div class="item-2 round-border">
<p>Sign Up:</p> <p>Sign Up:</p>
<form action="%CONTENT_DIR%/signup/verify-email/" method="post"> <form action="%CONTENT_DIR%/signup/verify-email/" method="post">
<p>Benutzername: <input type="text" name="username" placeholder=Username"/> </p> <p>Benutzername: <input type="text" name="username" placeholder="Username" /> </p>
<p>E-Mail: <input type="text" name="email" placeholder="email@example.com"/> </p> <p>E-Mail: <input type="text" name="email" placeholder="email@example.com" /> </p>
<p>Passwort: <input type="password" name="password" placeholder="Password"/> </p> <p>Passwort: <input type="password" name="password" placeholder="Password" /> </p>
<p>Passwort best&auml;tigen: <input type="password" name="password_confirm" placeholder="Confirm password"/> </p> <p>Passwort best&auml;tigen: <input type="password" name="password_confirm" placeholder="Confirm password" /> </p>
<input type="submit" value="Register" /> <input type="submit" value="Register" />
</form> </form>
<p></p> <p></p>

View File

@ -13,9 +13,15 @@
return $random_string; return $random_string;
} }
$random_salt = generate_salt($permitted_chars); //for password hashing
$password_salt = generate_salt($permitted_chars);
$password_hash_method = "sha256"; $password_hash_method = "sha256";
//for token generation
$token_salt = generate_salt($permitted_chars);
$token_hashes = hash("crc32", $_POST['email']) . hash("crc32", $_POST['username']);
$token = str_shuffle($token_hashes . $token_salt);
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@ -51,11 +57,9 @@
</h1> </h1>
</div> </div>
<div class="item-2 round-border"> <div class="item-2 round-border">
<p>Bitte senden sie eine E-Mail mit folgendem Inhalt an <a href="mailto:signup@lostcave.ddnss.de?subject=signup&body=%TOKEN%">signup@lostcave.ddnss.de</a>:</p> <p>Bitte senden sie eine E-Mail mit folgendem Inhalt an <a href="mailto:signup@lostcave.ddnss.de?subject=signup&body=<?php echo $token; ?>">signup@lostcave.ddnss.de</a>:</p>
<a href="mailto:signup@lostcave.ddnss.de?subject=signup&body=%TOKEN%">signup@lostcave.ddnss.de</a>
<form action="%CONTENT_DIR%/signup/verify-email/redirect.php" method="post"> <form action="%CONTENT_DIR%/signup/verify-email/redirect.php" method="post">
<!-- TODO: add token generator --> <p><?php echo $token; ?></p>
<p>%TOKEN%</p>
<input type="submit" value="Weiter" /> <input type="submit" value="Weiter" />
</div> </div>
</div> </div>