summaryrefslogtreecommitdiffstats
path: root/web/lib/aur.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib/aur.inc.php')
-rw-r--r--web/lib/aur.inc.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php
index 6bc36ac5..8b9f31ec 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php
@@ -77,6 +77,16 @@ function check_sid($dbh=NULL) {
return;
}
+# Verify the supplied token matches the expected token for POST forms
+#
+function check_token() {
+ if (isset($_POST['token'])) {
+ return ($_POST['token'] == $_COOKIE['AURSID']);
+ } else {
+ return false;
+ }
+}
+
# verify that an email address looks like it is legitimate
#
function valid_email($addy) {