WIP: Road to 1.0.0 #1

Draft
miguel456 wants to merge 123 commits from develop into master
3 changed files with 63 additions and 25 deletions
Showing only changes of commit aa2bfac3e5 - Show all commits

View File

@ -94,7 +94,7 @@ class RegisterController extends Controller
break; break;
case 'medium': case 'medium':
$password = ['required', 'string', 'confirmed', 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[#?!@$%^&*-]).{10,}$/']; $password = ['required', 'string', 'confirmed', 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[#?!@$%^&*-]).{12,}$/'];
break; break;
case 'high': case 'high':

View File

@ -14,27 +14,41 @@
<img src="{{ config('adminlte.logo_img') }}" alt="logo" class="logo">{{ config('adminlte.logo') }} <img src="{{ config('adminlte.logo_img') }}" alt="logo" class="logo">{{ config('adminlte.logo') }}
</div> <!-- main content start --> </div> <!-- main content start -->
<p class="login-card-description">{{__('messages.register_acc')}}</p> <p class="login-card-description">{{__('messages.register_acc')}}</p>
<div class="alert alert-warning alert-dismissible">
<a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
<p><b>{{__('messages.pwsec.line1')}}</b></p>
<p>{{__('messages.pwsec.line2')}}</p>
<p>{{__('messages.pwsec.line3')}} </p> @if(\App\Facades\Options::getOption('pw_security_policy') !== 'off')
<ul>
<li> <div class="alert alert-warning alert-dismissible">
{{__('messages.pwsec.line4')}} <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
</li> <p><b>{{__('messages.pwsec.line1')}}</b></p>
<li> <p>{{__('messages.pwsec.line2')}}</p>
{{__('messages.pwsec.line5')}}
</li> <p>{{__('messages.pwsec.line3')}} </p>
<li> <ul>
{{__('messages.pwsec.line6')}} @switch(\App\Facades\Options::getOption('pw_security_policy'))
</li>
<li> @case('low')
{{__('messages.pwsec.line7')}} <li>A minimum of 10 characters</li>
</li> @break
</ul>
</div> @case('medium')
<li>A minimum of 12 characters;</li>
<li>At least one special character;</li>
<li>Lower case and upper case characters</li>
@break
@case('high')
<li>A minimum of 20 characters;</li>
<li>At least one special character;</li>
<li>Lower case and upper case characters</li>
<li>At least one numerical character</li>
@break
@endswitch
</ul>
</div>
@endif
<form action="{{ route('register') }}" method="POST" id="registerForm"> <form action="{{ route('register') }}" method="POST" id="registerForm">
@csrf @csrf
<div class="form-group"> <div class="form-group">
@ -54,10 +68,14 @@
<input type="password" id="passwordc" name="password_confirmation" class="form-control" placeholder="{{__('messages.sronly_confirmpassword')}}" /> <input type="password" id="passwordc" name="password_confirmation" class="form-control" placeholder="{{__('messages.sronly_confirmpassword')}}" />
</div> </div>
<div class="form-group mt-5">
<label for="mcusername" class="sr-only">{{__('messages.sronly_mcusername')}}</label> @if(\App\Facades\Options::getOption('requireGameLicense') && \App\Facades\Options::getOption('currentGame') == 'MINECRAFT')
<input type="text" name="uuid" class="form-control" id="mcusername" placeholder="{{__('messages.sronly_mcusername')}}" /> <div class="form-group mt-5">
</div> <label for="mcusername" class="sr-only">{{__('messages.sronly_mcusername')}}</label>
<input type="text" name="uuid" class="form-control" id="mcusername" placeholder="{{__('messages.sronly_mcusername')}}" />
</div>
@endif
<input name="register" id="register" class="btn btn-block login-btn mb-4" type="submit" value="{{__('messages.register_txt')}}"> <input name="register" id="register" class="btn btn-block login-btn mb-4" type="submit" value="{{__('messages.register_txt')}}">
</form> </form>
<p class="login-card-footer-text">{{__('messages.have_account')}} <a href="{{ route('login') }}" class="text-reset">{{__('messages.login_here')}}</a></p> <p class="login-card-footer-text">{{__('messages.have_account')}} <a href="{{ route('login') }}" class="text-reset">{{__('messages.login_here')}}</a></p>

View File

@ -90,6 +90,26 @@
</div> </div>
@if($security['secPolicy'] == 'off')
<div class="row">
<div class="col">
<div class="alert alert-danger">
<p><b><i class="fas fa-exclamation-triangle"></i> DANGER: </b> Insecure security policy</p>
<p>Your current password security policy is set to <b>off</b>. This allows users to choose potentially unsafe passwords.</p>
<p>We strongly recommend you update this value to <b>Low</b> or <b>Medium</b>.</p>
</div>
</div>
</div>
@endif
<div class="row"> <div class="row">