]> git.mxchange.org Git - friendica.git/commitdiff
add token to register
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sat, 6 May 2017 12:49:53 +0000 (14:49 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sat, 6 May 2017 12:49:53 +0000 (14:49 +0200)
mod/register.php
view/templates/register.tpl

index 5e8da4685a0f61d342d180fe68b4d45c0bbfa193..cfb65b69dfce883169d689721d372825b0540d3e 100644 (file)
@@ -6,6 +6,7 @@ require_once('include/user.php');
 
 if(! function_exists('register_post')) {
 function register_post(App $a) {
+       check_form_security_token_redirectOnErr('/register', 'register');
 
        global $lang;
 
@@ -294,7 +295,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;
 
index 5c55dac2027a82eaae37ef5df7eb81a3f2fced7f..55c08627419c0286775733fd5c8dd3f5ee0e83d8 100644 (file)
@@ -3,6 +3,7 @@
 <form action="register" method="post" id="register-form">
 
        <input type="hidden" name="photo" value="{{$photo}}" />
+       <input type="hidden" name="form_security_token" value="{{$form_security_token}}">
 
        {{if $registertext != ""}}<div class="error-message">{{$registertext}} </div>{{/if}}