Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route is registered out of nova #9

Open
yurii-github opened this issue Jul 15, 2019 · 6 comments
Open

route is registered out of nova #9

yurii-github opened this issue Jul 15, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@yurii-github
Copy link

yurii-github commented Jul 15, 2019

you do not check if current app is nova or not, you always register routes like
nova-vendor/KABBOUCHI/logs-tool/log

you must use checks like nova:serving() etc

regards

@KABBOUCHI KABBOUCHI added the enhancement New feature or request label Jul 15, 2019
@mstaack
Copy link

mstaack commented Aug 3, 2020

yeah this also adds a security risk! b/c routes are public.... and download of logs is possible without any auth!

@KABBOUCHI
Copy link
Owner

@mstaack routes is under nova middleware what risks you are talking about?

Route::middleware(['nova', Authorize::class])
->prefix('nova-vendor/KABBOUCHI/logs-tool')
->group(__DIR__.'/../routes/api.php');

@mstaack
Copy link

mstaack commented Aug 3, 2020

i did a quick test and it seemed like downloading files is possible without nova login

@mstaack
Copy link

mstaack commented Aug 3, 2020

ok just did this again, sry for the misleading info. seems to work once canDownload() is used on the tool

@KABBOUCHI
Copy link
Owner

Yeah you should not use true, you should check the user permission.

I'll modify the README file to prevent confusions

@mstaack
Copy link

mstaack commented Aug 3, 2020

Yeah makes sense! Thanks for the readme updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants