mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Merge pull request #15324 from snipe/jerk_prevention
Some checks failed
Crowdin Action / upload-sources-to-crowdin (push) Has been cancelled
Docker images (Alpine) / docker (push) Has been cancelled
Docker images / docker (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Has been cancelled
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Has been cancelled
Some checks failed
Crowdin Action / upload-sources-to-crowdin (push) Has been cancelled
Docker images (Alpine) / docker (push) Has been cancelled
Docker images / docker (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Has been cancelled
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Has been cancelled
Prevent passing an array as login
This commit is contained in:
commit
cb40a82e79
|
@ -508,8 +508,8 @@ class LoginController extends Controller
|
||||||
protected function validator(array $data)
|
protected function validator(array $data)
|
||||||
{
|
{
|
||||||
return Validator::make($data, [
|
return Validator::make($data, [
|
||||||
'username' => 'required',
|
'username' => 'required|not_array',
|
||||||
'password' => 'required',
|
'password' => 'required|not_array',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,16 +57,22 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
||||||
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
|
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
|
||||||
<label for="username"><i class="fas fa-user" aria-hidden="true"></i> {{ trans('admin/users/table.username') }}</label>
|
<label for="username">
|
||||||
|
<i class="fas fa-user" aria-hidden="true"></i>
|
||||||
|
{{ trans('admin/users/table.username') }}
|
||||||
|
</label>
|
||||||
<input class="form-control" placeholder="{{ trans('admin/users/table.username') }}" name="username" type="text" id="username" autocomplete="{{ (config('auth.login_autocomplete') === true) ? 'on' : 'off' }}" autofocus>
|
<input class="form-control" placeholder="{{ trans('admin/users/table.username') }}" name="username" type="text" id="username" autocomplete="{{ (config('auth.login_autocomplete') === true) ? 'on' : 'off' }}" autofocus>
|
||||||
{!! $errors->first('username', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
{!! $errors->first('username', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
|
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||||
<label for="password"><i class="fa fa-key" aria-hidden="true"></i> {{ trans('admin/users/table.password') }}</label>
|
<label for="password">
|
||||||
|
<i class="fa fa-key" aria-hidden="true"></i>
|
||||||
|
{{ trans('admin/users/table.password') }}
|
||||||
|
</label>
|
||||||
<input class="form-control" placeholder="{{ trans('admin/users/table.password') }}" name="password" type="password" id="password" autocomplete="{{ (config('auth.login_autocomplete') === true) ? 'on' : 'off' }}">
|
<input class="form-control" placeholder="{{ trans('admin/users/table.password') }}" name="password" type="password" id="password" autocomplete="{{ (config('auth.login_autocomplete') === true) ? 'on' : 'off' }}">
|
||||||
{!! $errors->first('password', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
{!! $errors->first('password', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
|
<div class="form-group">
|
||||||
<label class="form-control">
|
<label class="form-control">
|
||||||
<input name="remember" type="checkbox" value="1"> {{ trans('auth/general.remember_me') }}
|
<input name="remember" type="checkbox" value="1"> {{ trans('auth/general.remember_me') }}
|
||||||
</label>
|
</label>
|
||||||
|
|
Loading…
Reference in a new issue