Skip to content

[5.2] Remove default APP_KEY value #3850

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

Merged
merged 1 commit into from
Aug 2, 2016

Conversation

crynobone
Copy link
Member

Since we now have a default config as:

'key' => env('APP_KEY'),

And during the artisan key:generate command as following:

file_put_contents($this->laravel->environmentFilePath(), str_replace(
    'APP_KEY='.$this->laravel['config']['app.key'],
    'APP_KEY='.$key,
    file_get_contents($this->laravel->environmentFilePath())
));

The generated app key would be generated with suffix of SomeRandomString because it's not the original key, the original key is either null (or '').

Signed-off-by: crynobone crynobone@gmail.com

Signed-off-by: crynobone <crynobone@gmail.com>
@alexbowers
Copy link

This has been discussed quite a few times, and always comes out as it doesn't want changing, since the length of the key is not the required 32 chars, it throws a security exception.

How is no key better than the default key?

@alexbowers
Copy link

#3587
#3566
#3477
#3451
#3431

etc

@crynobone
Copy link
Member Author

How is no key better than the default key?

Making a default of 32-char is a lazy solution to be honest.

This has been discussed quite a few times, and always comes out as it doesn't want changing

This is not changing anything, the config has been updated to default to null since December 2015 b81af30

@taylorotwell taylorotwell merged commit f242112 into laravel:master Aug 2, 2016
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