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 class IndexController extends Controller
{ {
/** @var JournalRepositoryInterface */ private JournalRepositoryInterface $journalRepository;
private $journalRepository;
/** /**
* IndexController constructor. * IndexController constructor.

View File

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

View File

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