Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloud.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJos Poortvliet <jospoortvliet@gmail.com>2021-06-07 17:56:39 +0300
committerJos Poortvliet <jospoortvliet@gmail.com>2021-06-07 17:56:39 +0300
commit375efebd7a763598d45a08ab53eacf0568970071 (patch)
tree97c7552a3787f4085f03ec69f5681b2c6b4a75f5 /page-trialsubmit.php
parentfdf064f93834c8a7d11bf2447cd057bd73605a4e (diff)
add captcha to quote and trial pages
Signed-off-by: Jos Poortvliet <jospoortvliet@gmail.com>
Diffstat (limited to 'page-trialsubmit.php')
-rw-r--r--page-trialsubmit.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/page-trialsubmit.php b/page-trialsubmit.php
index 2cec1814..59a453f1 100644
--- a/page-trialsubmit.php
+++ b/page-trialsubmit.php
@@ -45,6 +45,7 @@
<?php
require_once realpath(dirname(__FILE__)) . '/lib/ratelimiter.php';
+require_once realpath(dirname(__FILE__)) . '/lib/captcha.php';
if(!canPerformLimitedAction("trial-submit-action", 2)) {
die("Too many requests. Please try again later.");
@@ -86,7 +87,13 @@ if(isset($_POST['email'])) {
$foundnextcloud = $_POST['foundnextcloud'];
$error_message = "";
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,10}$/';
- if(!preg_match($email_exp,$email_from)) {
+
+ if(!IsValidCaptcha($_POST['captcha'])) {
+ $error_message .= 'The captcha result you entered does not appear to be correct.<br />';
+ }
+
+
+ if(!preg_match($email_exp,$email_from)) {
$error_message .= 'The email address you entered does not appear to be valid.<br />';
}
$string_exp = "/^[A-Za-z .'-]+$/";