aboutsummaryrefslogtreecommitdiff
path: root/www/update.php
diff options
context:
space:
mode:
authorroot2014-04-15 20:03:48 +0200
committerroot2014-04-15 20:03:48 +0200
commitb4e9313612dd341e43e5dc998469ec346adea8c6 (patch)
tree49f4ab238cf03d09b58ee9ef883f2e41f3e418a1 /www/update.php
parent34080a9121c4710610b2537175818aa1b9f4a6ce (diff)
downloadjungegemeinde-b4e9313612dd341e43e5dc998469ec346adea8c6.tar.gz
Added failure page and fixed brutforce protection.
Diffstat (limited to 'www/update.php')
-rw-r--r--www/update.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/www/update.php b/www/update.php
index 04df988..67a92a1 100644
--- a/www/update.php
+++ b/www/update.php
@@ -10,7 +10,7 @@ function update_db($db){
$email = SQLite3::escapeString($_POST["email"]);
$bday = SQLite3::escapeString($_POST["geburtstag"]);
- if(!preg_match("/^[0-9]+$/", $id) || !preg_match("/[0-9]+$/", $telefonnummer) || !preg_match("/^.+@.+$/", $email)){
+ if((!empty($id) && !preg_match("/^[0-9]+$/", $id)) || (!empty($telefonnummer) && !preg_match("/^[0-9]+$/", $telefonnummer) )|| (!empty($email) && !preg_match("/^.+@.+$/", $email))){
return false;
}