Giter Site home page Giter Site logo

Comments (11)

axelitus avatar axelitus commented on July 3, 2024 1

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.

katzsimon avatar katzsimon commented on July 3, 2024 1

It looks like it is working now for me

from laravel-database-encryption.

axelitus avatar axelitus commented on July 3, 2024 1

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.

austinheap avatar austinheap commented on July 3, 2024 1

v0.2.0 (Packagist) released, thanks for the help @axelitus, @TechTailor, & @katzsimon!

from laravel-database-encryption.

TechTailor avatar TechTailor commented on July 3, 2024

Hey, can you guys confirm if this issue is fixed?

from laravel-database-encryption.

axelitus avatar axelitus commented on July 3, 2024

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.

axelitus avatar axelitus commented on July 3, 2024

Hey @TechTailor see if the changes from the pull-request #32 help you out and fix your issue #31.

from laravel-database-encryption.

austinheap avatar austinheap commented on July 3, 2024

@axelitus @TechTailor any feedback? v0.2.0-rc3 ready for testing/feedback. Should be good to go!

from laravel-database-encryption.

axelitus avatar axelitus commented on July 3, 2024

Sorry @austinheap been busy with other things. Let me try the new code this week.

from laravel-database-encryption.

austinheap avatar austinheap commented on July 3, 2024

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.

austinheap avatar austinheap commented on July 3, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.