Some bug fixes.

This commit is contained in:
James Cole
2020-10-01 16:52:01 +02:00
parent d32611b2d5
commit c25f5598f1
3 changed files with 5 additions and 4 deletions

View File

@@ -41,8 +41,7 @@ use League\Csv\CannotInsertRecord;
class IndexController extends Controller
{
/** @var JournalRepositoryInterface */
private $journalRepository;
private JournalRepositoryInterface $journalRepository;
/**
* IndexController constructor.

View File

@@ -37,6 +37,8 @@ use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Routing\Redirector;
use Illuminate\View\View;
use Throwable;
use Log;
/**
* Class EditController
@@ -45,8 +47,7 @@ class EditController extends Controller
{
use RuleManagement, RenderPartialViews;
/** @var RuleRepositoryInterface Rule repository */
private $ruleRepos;
private RuleRepositoryInterface $ruleRepos;
/**
* RuleController constructor.

View File

@@ -53,6 +53,7 @@ class PwndVerifierV2 implements Verifier
*/
public function validPassword(string $password): bool
{
// Yes SHA1 is unsafe but in this context its fine.
$hash = sha1($password);
$prefix = substr($hash, 0, 5);
$rest = substr($hash, 5);