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

[5.7] Don't print the generated application key #25802

Merged
merged 2 commits into from
Sep 27, 2018
Merged

[5.7] Don't print the generated application key #25802

merged 2 commits into from
Sep 27, 2018

Conversation

SjorsO
Copy link
Contributor

@SjorsO SjorsO commented Sep 27, 2018

The artisan key:generate command prints the generated application key in the console. Since the application key should be secret, it might be a better idea to not print the key. That way there is no chance it will end up in console history or a log file.

This PR makes the artisan key:generate command not print the generated key.

@laurencei
Copy link
Contributor

But if you have access to the console (to see the history) - then wouldnt you have access to the .env file, and thus the key anyway?

@taylorotwell taylorotwell merged commit 248245a into laravel:5.7 Sep 27, 2018
@deleugpn
Copy link
Contributor

For me, that was a cool feature. All I had to do was php artisan key:generate and copy from the terminal to place it where I wanted it.

@SjorsO
Copy link
Contributor Author

SjorsO commented Sep 27, 2018

If you want to generate a key and only have it printed in your console, you can run:
artisan key:generate --show

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

Successfully merging this pull request may close these issues.

4 participants