summaryrefslogtreecommitdiff
path: root/intern.gospeladlershof.de
diff options
context:
space:
mode:
authorhorus_arch2017-02-20 14:06:28 +0100
committerhorus_arch2017-02-20 14:06:28 +0100
commit5d1c13ee8695b7194031b8a8d8017c181b633045 (patch)
treef80f5adb06c987d63524937bc88b099193193ced /intern.gospeladlershof.de
parent5fd2250f7c9a5be373e5c71f50d0c1e001f80322 (diff)
downloadgospeladlershof.de-5d1c13ee8695b7194031b8a8d8017c181b633045.tar.gz
Diverse Bugfixes.
Diffstat (limited to 'intern.gospeladlershof.de')
-rw-r--r--intern.gospeladlershof.de/check_login.php3
-rw-r--r--intern.gospeladlershof.de/code/check_login.php2
-rw-r--r--intern.gospeladlershof.de/code/login.php6
-rw-r--r--intern.gospeladlershof.de/code/template/text_mail.php2
-rw-r--r--intern.gospeladlershof.de/login.php2
5 files changed, 8 insertions, 7 deletions
diff --git a/intern.gospeladlershof.de/check_login.php b/intern.gospeladlershof.de/check_login.php
index e812a99..65eb24f 100644
--- a/intern.gospeladlershof.de/check_login.php
+++ b/intern.gospeladlershof.de/check_login.php
@@ -31,7 +31,8 @@ if ( ! empty($_SESSION) ) {
?>
<h2 class="form-signin-heading">Login</h2>
<label for="inputEmail" class="sr-only">Authentifizierung</label>
- <input name="text" type="text" id="auth_code" class="form-control" placeholder="Der Code aus der E-Mail-Adresse" required autofocus>
+ <input name="hash" type="text" id="auth_code" class="form-control" placeholder="Der Code aus der E-Mail-Adresse" required autofocus>
+ <input name="email" type="hidden" value="<?php echo htmlentities($_SESSION['user'];?>">
<span class="help-block">Du hast einen Code aus der E-Mail enthalten. Trag ihn hier ein.</span>
<button class="btn btn-lg btn-primary btn-block" type="submit">Lass mich rein</button>
</form>
diff --git a/intern.gospeladlershof.de/code/check_login.php b/intern.gospeladlershof.de/code/check_login.php
index 0ea8ecd..ca3a4ca 100644
--- a/intern.gospeladlershof.de/code/check_login.php
+++ b/intern.gospeladlershof.de/code/check_login.php
@@ -16,7 +16,7 @@ $redis = new Predis\Client([
$correct_hash = $redis->get($mail);
-if ( $hash === $correct_hash ) {
+if ( $hash === $correct_hash && $hash != "" && $correct_hash != "" ) {
$_SESSION["login"] = true;
$_SESSION["success"] = "Erfolgreich eingeloggt.";
$_SESSION["user"] = $mail;
diff --git a/intern.gospeladlershof.de/code/login.php b/intern.gospeladlershof.de/code/login.php
index 002ddd3..b1ad01f 100644
--- a/intern.gospeladlershof.de/code/login.php
+++ b/intern.gospeladlershof.de/code/login.php
@@ -19,7 +19,7 @@ foreach($addresses as $a) {
$htmlmessage = ob_get_clean();
ob_start();
- require __DIR__ . 'template/text_mail.php';
+ require __DIR__ . '/template/text_mail.php';
$textmessage = ob_get_clean();
$redis = new Predis\Client([
@@ -34,7 +34,7 @@ foreach($addresses as $a) {
$pheanstalk = new Pheanstalk('192.168.122.1');
$data = array(
- 'To' => $mail,
+ 'To' => array($mail),
'Name' => 'Gospelchor Adlershof',
'From' => 'noreply@gospeladlershof.de',
'ReplyTo' => 'webmaster@gospeladlershof.de',
@@ -44,7 +44,7 @@ foreach($addresses as $a) {
);
$pheanstalk
- ->useTube('contactme_mailer')
+ ->useTube('contactme_mail')
->put(json_encode($data));
$_SESSION["user"] = $mail;
diff --git a/intern.gospeladlershof.de/code/template/text_mail.php b/intern.gospeladlershof.de/code/template/text_mail.php
index 7e67be7..4b815ec 100644
--- a/intern.gospeladlershof.de/code/template/text_mail.php
+++ b/intern.gospeladlershof.de/code/template/text_mail.php
@@ -1,7 +1,7 @@
Hallo,
um dich auf der Webseite des Gospelchors einzuloggen, folge bitte diesem Link:
-https://intern.gospeladlershof.de/code/check_login.php?email=<?php echo htmlentities($mail);>&hash=<?php echo $hash; ?>
+https://intern.gospeladlershof.de/code/check_login.php?email=<?php echo htmlentities($mail);?>&hash=<?php echo $hash; ?>
Der Link verfällt innerhalb 24h.
Sollte der Link nicht funktionieren, dein Authentifizierungscode lautet <?php echo $hash; ?>.
diff --git a/intern.gospeladlershof.de/login.php b/intern.gospeladlershof.de/login.php
index 23c2695..1ced39b 100644
--- a/intern.gospeladlershof.de/login.php
+++ b/intern.gospeladlershof.de/login.php
@@ -32,7 +32,7 @@ if ( ! empty($_SESSION) ) {
<h2 class="form-signin-heading">Bitte melde dich an</h2>
<label for="inputEmail" class="sr-only">E-Mail Adresse</label>
<input name="email" type="email" id="inputEmail" class="form-control" placeholder="E-Mail-Adresse" required autofocus>
- <span class="helper-block">Es wird dir eine E-Mail an dieselbe Adresse geschickt, mit der du auch die anderen E-Mails des Chors liest.</span>
+ <span class="help-block">Es wird dir eine E-Mail an dieselbe Adresse geschickt, mit der du auch die anderen E-Mails des Chors liest.</span>
<button class="btn btn-lg btn-primary btn-block" type="submit">Lass mich rein</button>
</form>