a better approach than storing mysql password in plain text in config file?

前端 未结 8 2053
说谎
说谎 2020-11-29 00:26

It\'s always bothered me that many PHP programs require the user to store the mysql password in plain text (in a string or constant) in a configuration file in the applicati

8条回答
  •  爱一瞬间的悲伤
    2020-11-29 00:48

    If you're willing to trade off availability for file security, you could take the password out of the config file and require an administrator to type it in when booting and store it in a global variable.

    You still have to make sure you're safe from injection attacks that could dump that variable out, and of course you have a manual step in the (re)boot process.

提交回复
热议问题