'id' => 'smssettings',
'action' =>
common_local_url('smssettings')));
-
+ common_hidden('token', common_session_token());
common_element('h2', NULL, _('Address'));
if ($user->sms) {
function handle_post() {
+ # CSRF protection
+
+ $token = $this->trimmed('token');
+ if (!$token || $token != common_session_token()) {
+ $this->show_form(_('There was a problem with your session token. Try again, please.'));
+ return;
+ }
+
if ($this->arg('save')) {
$this->save_preferences();
} else if ($this->arg('add')) {