Form : use Csrf (instead of csrf)

This commit is contained in:
2022-07-21 13:30:31 +02:00
parent e0fdda6fb8
commit cb0d01101f

View File

@@ -382,7 +382,7 @@ class Form
if ($this->csrf === TRUE) if ($this->csrf === TRUE)
{ {
$csrf = new csrf (); $csrf = new Csrf ();
$csrf->field = $this->formName."[".$this->csrfField."]"; $csrf->field = $this->formName."[".$this->csrfField."]";
$res .= $csrf->displayFormCSRF (); $res .= $csrf->displayFormCSRF ();
$this->csrfToken = $csrf->getToken (); $this->csrfToken = $csrf->getToken ();
@@ -433,7 +433,7 @@ class Form
public function checkToken ($tokenFromUser) public function checkToken ($tokenFromUser)
// {{{ // {{{
{ {
$csrf = new csrf (); $csrf = new Csrf ();
$csrf->field = $this->csrfField; $csrf->field = $this->csrfField;
// The checkThenDeleteToken method check the token and except if there is a // The checkThenDeleteToken method check the token and except if there is a
// problem. If there is no problem, it delete the token // problem. If there is no problem, it delete the token