summaryrefslogtreecommitdiff
path: root/inc/form.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/form.php')
-rw-r--r--inc/form.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/inc/form.php b/inc/form.php
index b011729ea..4e210ab07 100644
--- a/inc/form.php
+++ b/inc/form.php
@@ -51,6 +51,8 @@ class Doku_Form {
/**
* Constructor
*
+ * Autoadds a security token
+ *
* @param string $id ID attribute of the form.
* @param string $action (optional) submit URL, defaults to DOKU_SCRIPT
* @param string $method (optional) 'POST' or 'GET', default is post
@@ -60,6 +62,8 @@ class Doku_Form {
$this->id = $id;
$this->action = ($action) ? $action : script();
if ($method) $this->method = $method;
+
+ $this->addHidden('sectok', getSecurityToken());
}
/**