Comments (11)
As proposed in #28 I've made a test by changing the name of the AustinHeap\Database\Encryption\Traits::getAttributes()
method to getUnencryptedAttributes()
and letting Laravel handle the getAttributes()
call (which just returns the $this->attributes
property that has the encrypted value as before the change).
The encrypted value is being stored correctly in the database:
��__LARAVEL-DATABASE-ENCRYPTED-VERSION-00-01-02__��version�VERSION-00-01-02��type�string[native]��eyJpdiI6IlpXdjlXWkNTYVZvXC9ENVhsS3paaUp3PT0iLCJ2YWx1ZSI6IlhIekh4TDJDUzBVa0o4SGpVMVVCdmN4UXVldmNEdThNdWZUY1JJUkR5QkVRSkNpMStEZ2pVUUp2WnpDWUtVdXprZ1ViMlwvQ3Vpa2NWWEZ6aGNXbXNSVUdIXC8rTnppMytFUTJFeGFnQ1RlZldxWmUxY2V2QlFITXJ2S3hQeEZzOVdOTGpRVUEzUHNid3JFcDFqRDNFRGd5OWxqYnNcL2hOWE82QUNGbnVFaGtOTWkxU2NXTFwvVTkrQ0FxSDVqbUZpb3hQT21VaGdcL0REWUNLNTVVUVI5MUsrdz09IiwibWFjIjoiYWZlNTQ4NjZiYmY2MjIwZWE0ZmMyNDRkZGRkNzRkMjc1YjUxZGQxMmFhMjkzNzkzMDAxNmEyNmJjNzVjOTk4NyJ9
However, this change may potentially break other things in your code. I don't know (haven't had the time to inspect everything) if you are relying on the getAttributes()
method to return the unencrypted values elsewhere.
from laravel-database-encryption.
It looks like it is working now for me
from laravel-database-encryption.
Alright @austinheap, I tried the v0.2.0-rc3 in my project and it seems to be working fine. The data is now being encrypted into the database record.
from laravel-database-encryption.
v0.2.0 (Packagist) released, thanks for the help @axelitus, @TechTailor, & @katzsimon!
from laravel-database-encryption.
Hey, can you guys confirm if this issue is fixed?
from laravel-database-encryption.
At the moment there hasn't been any new commits since reporting this issue, so I think that it still does not work out-of-the-box. I've been using the code with my workaround applied and it has been working (though I haven't tested it thoroughly). I'll try to do a pull-request with the changes I've made later on the day.
from laravel-database-encryption.
Hey @TechTailor see if the changes from the pull-request #32 help you out and fix your issue #31.
from laravel-database-encryption.
@axelitus @TechTailor any feedback? v0.2.0-rc3 ready for testing/feedback. Should be good to go!
from laravel-database-encryption.
Sorry @austinheap been busy with other things. Let me try the new code this week.
from laravel-database-encryption.
Sorry @austinheap been busy with other things. Let me try the new code this week.
@axelitus No worries, just want to make sure it's working for you now 😄
It looks like it is working now for me
@katzsimon Great to hear!
from laravel-database-encryption.
@axelitus Good deal! I'll release v0.2.0 in a week to give time for regressions to occur.
from laravel-database-encryption.
Related Issues (20)
- Releasedate for Laravel 5.7 support? HOT 1
- No Encryption then Create new Model instance HOT 1
- Encryption in Lumen for API HOT 2
- Composer dependencies conflict with Roave/SecurityAdvisories HOT 1
- PHP 7.3/7.4 unit test coverage not available
- firstOrCreate() only encrypts properties in first parameter--not second. HOT 1
- Need help with `DB_ENCRYPTION_VERSIONING=false` in .env file HOT 3
- New Version of paragonie/random_compat HOT 2
- Class 'AustinHeap\Database\Encryption\Tests\DatabaseTestCase' not found
- Laravel 5.8 support HOT 13
- Cannot decrypt model attribute with no package header! Error HOT 2
- Migrating Installs HOT 1
- Laravel 6 Support HOT 3
- Dependency version conflict HOT 1
- Please add support for Laravel 6 HOT 9
- Is there a way to encrypt old-unencrypted data? HOT 1
- Showing encrypted data HOT 2
- Decryption not working if APP_KEY is changed HOT 3
- Standalone version
- Not every record is encrypted HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-database-encryption.