1

I'm trying to use Auth class of Laravel to make safe a FileManager module.

The filemanager: http://www.responsivefilemanager.com/

The Filemanager is on my /public rep and it is accessible via this route : ROOT/filemanager/dialog.php without authentication... It's big fail of security !

And to fix it, I would like to use Auth! But I don't know how I can do that! I have tried to require the boostrap/start.php file but it doesn't work.

2
  • why wouldn't an authenticated route work? Commented Sep 11, 2014 at 14:07
  • make a auth route of /filemanager/dialog Commented Sep 11, 2014 at 14:16

1 Answer 1

2

This is how you boot Laravel from an external script:

include __DIR__ . '/../vendor/autoload.php';
$app = require_once __DIR__ . '/../bootstrap/start.php';
$app->boot();

Now you can just do:

if ( ! Auth::check()) 
{
    ...
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.