PLangHQ / plang

The code repository from plang programming language
GNU Lesser General Public License v2.1
51 stars 5 forks source link

Store Private Keys in a more unique location #28

Closed Mai-Lapyst closed 8 months ago

Mai-Lapyst commented 8 months ago

The current path (.db/system.sqlite), is risky since it isn't unique enough. It should rather use a path similar to .plang/keys/system.sqlite or similar. In each case, the name of the project / language (plang) should be inside the filename or path to distinguish it from other applications that might want to store data inside .db. This is important epsc for desktop systems as they typically have hundrets of difference applications installed.

ingig commented 8 months ago

Thanks @Mai-Lapyst for the first issue created that is not created by me, this is cause for a small celebration 🎉

The path is relative to the app you create, it's the pattern that plang follows and since each app has its own .db folder it's unique to each app. It is therefore ok.

Digging deeper into the language, you'll find out that you can share keys between apps, then the pattern is similar to what you suggest, or /plang/{appid}/.db/system.sqlite

I'll be closing the issue since it's not a problem

Big thanks for this first issue ♥️