diff options
| author | root | 2014-04-15 20:03:48 +0200 |
|---|---|---|
| committer | root | 2014-04-15 20:03:48 +0200 |
| commit | b4e9313612dd341e43e5dc998469ec346adea8c6 (patch) | |
| tree | 49f4ab238cf03d09b58ee9ef883f2e41f3e418a1 /www/update.php | |
| parent | 34080a9121c4710610b2537175818aa1b9f4a6ce (diff) | |
| download | jungegemeinde-b4e9313612dd341e43e5dc998469ec346adea8c6.tar.gz | |
Added failure page and fixed brutforce protection.
Diffstat (limited to 'www/update.php')
| -rw-r--r-- | www/update.php | 2 |
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; } |
