]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #3439 from tobiasd/20170506-token
authorMichael Vogel <icarus@dabo.de>
Sun, 2 Jul 2017 19:31:53 +0000 (21:31 +0200)
committerGitHub <noreply@github.com>
Sun, 2 Jul 2017 19:31:53 +0000 (21:31 +0200)
[Needs OpenID testing] Add token to register

1  2 
mod/register.php

diff --combined mod/register.php
index d6343a22856004f0dc8ac7c001c8b0c99ed9ba6a,cfb65b69dfce883169d689721d372825b0540d3e..4766445d88cedf8f69bd97991c11583fe6fac37e
@@@ -1,13 -1,12 +1,14 @@@
  <?php
  
 +use Friendica\App;
 +
  require_once('include/enotify.php');
  require_once('include/bbcode.php');
  require_once('include/user.php');
  
  if(! function_exists('register_post')) {
  function register_post(App $a) {
+       check_form_security_token_redirectOnErr('/register', 'register');
  
        global $lang;
  
@@@ -83,7 -82,7 +84,7 @@@
                }
  
                // Only send a password mail when the password wasn't manually provided
 -              if (!x($_POST,'password1') OR !x($_POST,'confirm')) {
 +              if (!x($_POST,'password1') || !x($_POST,'confirm')) {
                        $res = send_register_open_eml(
                                $user['email'],
                                $a->config['sitename'],
@@@ -296,7 -295,7 +297,7 @@@ function register_content(App $a) 
                '$sitename'  => $a->get_hostname(),
                '$importh'   => t('Import'),
                '$importt'   => t('Import your profile to this friendica instance'),
+               '$form_security_token'  => get_form_security_token("register")
        ));
        return $o;