FreeHealth / freehealth

Free and open source Electronic Health Record
https://freehealth.io
Other
44 stars 16 forks source link

Remove "serialization" of sql database connection parameters #95

Closed jeromecc closed 7 years ago

jeromecc commented 7 years ago

Database connection problems are always a pain to debug because of the serialization of connection parameters. Utils::nonDestructiveEncryption() is used with a key derived from the name of the app, it is not real encryption but easy to reverse obfuscation. There is no need to obfuscate host, database name etc. Users who want to store their username and password do it at their own peril and should encrypt their home folder.

(disaster resistant) Workflow:

Detect old setting "Network/Db" inside config-net.ini if exist AND new settings don't exist Create new settings Network/Database /hostname /password /login etc sync Check that new settings are equal to old settings delete old setting "Network/Db"

Database/ user password hostname port driver prefix path ssl/key ssl/cert ssl/ca ssl/capath ssl/cipher

jeromecc commented 7 years ago

Done with f99310b3355ee577ac97c7dc38362a4a2041f814 & e1f59971d80b526a854fd487091e849d7aef8142