]> git.mxchange.org Git - friendica.git/blobdiff - mod/lostpass.php
Update lostpass.php
[friendica.git] / mod / lostpass.php
index 51aee56df75e14cba7a8bbf5a8cfed99a3ccebd3..8a1a9f36e52fb80042eb82e3d750cdd4266de2c7 100644 (file)
@@ -1,7 +1,22 @@
 <?php
-
 /**
- * @file mod/lostpass.php
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
  */
 
 use Friendica\App;
@@ -26,7 +41,7 @@ function lostpass_post(App $a)
                DI::baseUrl()->redirect();
        }
 
-       $pwdreset_token = Strings::getRandomName(12) . random_int(1000, 9999);
+       $pwdreset_token = Strings::getRandomHex(32);
 
        $fields = [
                'pwdreset' => $pwdreset_token,