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

Laravel 5.6 - Data is stored as decrypted at model insert #26

Open
gbalduzzi opened this issue Nov 5, 2018 · 2 comments
Open

Laravel 5.6 - Data is stored as decrypted at model insert #26

gbalduzzi opened this issue Nov 5, 2018 · 2 comments

Comments

@gbalduzzi
Copy link

gbalduzzi commented Nov 5, 2018

With Laravel > 5.5, this package has some issues when updating a model as mentioned in #22 . There are some possible fixes to that (i.e. overriding getDirty and castAttribute methods).

However, I also noticed a similar issue when inserting a new record on database using Laravel 5.6.

In Class Illuminate\Database\Eloquent\Model, the method performInsert(), has been modified from

$attributes = $this->attributes;

to

$attributes = $this->getAttributes();

So the attributes are decrypted before being saved and are therefore stored in the database as plaintext. Is there a better way to fix this issue then overriding the whole performInsert() function to just change that line?

@ampodobas
Copy link

Has this package been abandoned? If not, then can this problem [with huge InfoSec ramifications] be fixed?

@PopMishima
Copy link

@ampodobas, a quick GitHub search landed me onto this repository. https://github.com/austinheap/laravel-database-encryption

Documentation says: "... [laravel-database-encryption]... it is a (more modern) replacement, it is not compatible directly out of the box."

With instruction How "[t]o migrate to this package from elocryptfive, ..." :)

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

No branches or pull requests

3 participants