git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit d56d97a4 authored by mmn's avatar mmn

Only POST Form widgets send a session token.

parent bfaa7007
......@@ -91,7 +91,9 @@ class Form extends Widget
function sessionToken()
{
$this->out->hidden('token-' . $this->id() ?: common_random_hexstr(3), common_session_token(), 'token');
if (strtolower($this->method()) == 'post') {
$this->out->hidden('token-' . $this->id() ?: common_random_hexstr(3), common_session_token(), 'token');
}
}
/**
......
......@@ -106,9 +106,4 @@ class SearchForm extends Form
{
return 'get';
}
function sessionToken()
{
return;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment