2017-01-23 6 views
0

私はデフォルトのlaravel authメソッドを使用しています。
パスワードをリセットしようとすると、リセットフォームを送信しようとするまですべて正常に機能します。Laravel 5.3エラーログなしのパスワードリセットエラー

現時点では、どのログでもエラーが表示されます。
私はので、私はエラーが発生した通知が供給していApp\Exceptions\handler.php

public function report(Exception $exception) 
{ 
    Artisan::call('sms:basic'); 

    parent::report($exception); 
} 

に次の行を追加したため、エラーが送信されます知っています。私はログインしていないし、新しいパスワードが機能していない。

この場合、laravel.logファイルは空です。だから私はなぜ働いているのか分からない。

Auth::routes(); 

ビューファイルがあります:

私が使用してルートがあります。

@extends('layouts.public') 

@section('content') 

     <!-- RESET FORM --> 
     <!--===================================================--> 
     <div class="cls-content"> 
      <div class="cls-content-sm panel"> 
       <div class="panel-body background-black fix-margin-top"> 
        <div class="text-left"><img style="height: 90px; width: auto;margin-left: -25px;" src="{{ url('/img/logoTorqueWhite.svg') }}" alt="" class=""></div> 
       </div> 
      </div> 
      <div class="cls-content-sm panel "> 
       <div class="panel-body fix-margin-top"> 
        <div class="pull-right"><a class="black" href="{{ url('/') }}"><i class="fa fa-times"></i></a></div> 
        <div class="row"> 
         <div class="col-xs-12 col-sm-8 vert-line"> 
          <p>Réinitialiser votre mot de passe</p> 
          @if (session('status')) 
           <div class="alert alert-success"> 
            {{ session('status') }} 
           </div> 
          @endif 
          <form method="POST" role="form" action="{{ url('/password/reset') }}"> 
           <div class="form-group text-left{{ $errors->has('email') ? ' has-error' : '' }}"> 
            <label>Courriel</label> 
            <input id="email" type="email" name="email" class="form-control" placeholder="" value="{{ old('email') }}"> 
            @if ($errors->has('email')) 
             <span class="form-control"> 
              <strong>{{ $errors->first('email') }}</strong> 
             </span> 
            @endif 
           </div> 

           <div class="form-group text-left{{ $errors->has('password') ? ' has-error' : '' }}"> 
            <label>Mot de passe</label> 
            <input type="password" name="password" class="form-control" placeholder=""> 
            @if ($errors->has('password')) 
             <span class="form-control"> 
              <strong>{{ $errors->first('password') }}</strong> 
             </span> 
            @endif 
           </div> 

           <div class="form-group text-left{{ $errors->has('password_confirmation') ? ' has-error' : '' }}"> 
            <label>Confirmer le mot de passe</label> 
            <input type="password" name="password_confirmation" class="form-control" placeholder=""> 
            @if ($errors->has('password_confirmation')) 
             <span class="form-control"> 
              <strong>{{ $errors->first('password_confirmation') }}</strong> 
             </span> 
            @endif 
           </div> 

           <div class="col-xs-12 no-padding"> 
            <div class="form-group text-right"> 
             <input name="reset" type="submit" class="btn btn-torque" value="RÉINITIALISER"> 
            </div> 
           </div> 
          </form> 
         </div> 
         <div class="col-xs-12 col-sm-4"> 
          <div class="valign text-right"> 
           <p>Contactez-nous<br> 
           (819) 679-2944<br> 
           [email protected]</p> 
          </div> 
         </div> 
        </div> 
        <div class="row text-left"> 
         {{--<div class="col-xs-12"> 
         Vous avez oublié votre mot de passe? <a href="/password/reset">Cliquez ici</a><br> 
         Vous n'avez pas encore de compte Torque? Créé un compte 
         </div>--}} 
        </div> 
       </div> 
      </div> 
     </div> 
     <!--===================================================--> 
@endsection 

私はどこか、このルートを追加するかどうかを尋ねる人を見ました:

Route::get('test', function(){ 
    dd (bcrypt('raw_password') == "encrypted_password_in_db"); 
}); 

それは偽の私を返し、男はそれがtrueを返すと仮定言っていました。 これには他の説明はありませんでしたが、おそらくそれが私の手伝いを助けることができます。私はこれが何を意味するのか本当にわからない。

+0

ログイン後にパスワードをリセットしてみましたか? – Rahi

+0

私はリセットしようとするとログアウトしています。私はパスワードを変更することができますが、私はカスタムパスワード変更フォームでロギングしています。 –

答えて

0

それが動作します後、新しいパスワードを使用して、

Hash::make('newpassword')

を保存する:あなたがそれをチェックすることはできませんので

Route::get('test', function(){ 
    dd (Hash::check('raw_password', 'encrypted-password')); 
}); 

Laravelは=、常にランダム塩漬けパスワードを使用します=

+0

私はあなたのコード行を試してみると、結果としてfalseになった。 –

+0

また、私はハシッドのセキュリティを守るためには、bcryptより低いですか? bcryptを使うときには、代わりにHash :: decode( 'anything')を使うことができます。そのための組み込みデコードはありません。 –