diff options
author | Marvin Borner | 2018-07-08 21:51:24 +0200 |
---|---|---|
committer | Marvin Borner | 2018-07-08 21:51:24 +0200 |
commit | 1240ace21d2270e87e61cb88aaa0e4508dcdb967 (patch) | |
tree | 371ae9b2b0d92fc25d19741507c5b332af0f39f4 /database | |
parent | 1c2e6127f480979186e62c2e6ecc2971bf3a4451 (diff) |
Better previous hash control
Diffstat (limited to 'database')
-rw-r--r-- | database/migrations/2014_10_12_000000_create_users_table.php | 1 | ||||
-rw-r--r-- | database/seeds/DatabaseSeeder.php | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 55e1804..9281465 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -18,6 +18,7 @@ class CreateUsersTable extends Migration $table->string('email')->unique(); $table->string('password'); $table->string('avatar')->default('0.png'); + $table->string('prevHash', 60)->unique(); $table->string('hash', 60)->unique(); $table->rememberToken(); $table->timestamps(); diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index b31b7e0..1f7953b 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -18,13 +18,15 @@ class DatabaseSeeder extends Seeder 'name' => 'genesis', 'email' => ' ', 'password' => ' ', - 'hash' => bcrypt('genesis') + 'prevHash' => '0', + 'hash' => Hash::make('genesis') ]); DB::table('users')->insert([ 'name' => 'Marvin Borner', 'email' => 'marvin@borners.de', 'password' => Hash::make('password'), + 'prevHash' => Hash::make('genesis'), 'hash' => Hash::make(Hash::make('genesis') . 'Marvin Borner' . 'marvin@borners.de' . Hash::make('password')) // hashing: prev hash, all fields in current 'block' ]); } |