SOLVED: License Keys are not Encrypted they are saved in plain text on database

License Keys are not Encrypted they are saved in plain text on database :expressionless_face:

I was wondering how the license key is saved but I wish I didnt wondered at all :rofl:

problem is this line in the TOS.


with plain text saving on the database it is impossible for us to protect the key :slight_smile:

when we install and forget the license on client site anything can happen later on :slight_smile:

anyway simple encryption is the solution.

like (domainname + bricksbuilder.io secretkey = hash) hash gets generated remotely on bricks server :slight_smile:

when the license key is entered and hash gets generated remotely in the bricks site and saved only the rand hash on the site.

Of course, there are other solutions similar to this and I bet there is a better solution out there that I don’t know.

Not sure if this went unnoticed. But should be considered for sure :+1:

they are aware of it. :+1:
it is not an easy thing to solve let’s give them time to think about it . :blush:

I still think the way Metabox did their key licensing management system is perhaps one of the most elegant solutions I have seen.

If the Bricks team takes a look at how the Metabox team did it, I am quite sure that they could definitely implement something (albeit more limited/simpler) so that key encryption won’t be such a bother.

yep

any encryption would work honestly. anything is better than plain text.
local or remote doesn’t matter.

even a customized domain name based base64 would work.
there are soooo many ways to solve this.

Where are we on this? I too am concerned in this regard to the license - like, do a website - pass it off to client - then what? Is that violating the license agreement, then? I do have a lifetime license and want to keep it - but also be able to just hand sites off to clients. Do they need to then buy their own bricks keys? What’s the official solution here, and what’s the idea?

I understand the concept behind this writ in the license agreement is that one does not publicly sell or provide key to someone else, but, like sinanisler presented, w/ the key in the database stored as clear text, anyone w/ the access to db basically gets the key and can simply use it to deploy other sites.

Not that clients are aware, I’d say, for most part - but what if? What’s the official standpoint - it’s been over a year and a half since this was posted…

Hi guys,
Thanks for bumping this.

We’ve addressed this internally by adding support for defining the Bricks license key via a BRICKS_LICENSE_KEY PHP constant, so the key does not have to be stored in the database for blueprint, cloned, or client-handoff workflows.

This is currently staged and not part of a public release yet. We’ll update this thread once it ships :v:

We’ve addressed this in Bricks 2.4-beta (beta release), now available for manual download from your Bricks account.

Please read the changelog entry before testing, and let us know if you experience any issues. Note: beta builds are not recommended for production sites.

Hello friends. Bricks version 2.4 has just been released. I updated my site and immediately checked how the license key is handled in the database regarding encryption.
Unfortunately, nothing has changed.
I tried deactivating and then reactivating the license on my site, but the key is still stored in plain text. I wouldn’t want my license key to fall into the wrong hands so easily. Please look into this.
I’ve seen how Crocoblock plugins handle licenses—they allow you to generate a unique key for each client site that is tied specifically to that domain. That gave me confidence that my personal key wouldn’t end up in the wrong hands and that I wouldn’t be violating the license agreement.
Yes, I am aware of allowlists and blocklists, but when working in an agency setting, I would prefer to have more control over the connected sites.
Thanks for your hard work.

Hi @tooweb ,
Please read the changelog and the linked docs:

That’s how it’s implemented since 2.4 beta.

Yes, I saw that, but it doesn’t solve the original issue raised in this discussion—an issue that dates back to 2024. Defining the key via a constant involves adding it to wp-config.php, which in some cases is stored on the client’s hosting environment, meaning the client could potentially access it at any time.

That may be true, but that was the proposed solution, and it seemed to have been accepted. See my reply from June a little further up:

Feel free to submit a new feature request :slight_smile: