Just to remember, MIDAS has cm_expand_env() to expand environment variables, in
file paths, etc. It is used in several places in mhttpd, msequencer and mjsonrpc.
std::string my_secret_file = cm_expand_env("$HOME/.ssh/authorised_keys");
One could add it everywhere we open files, etc, except for the security
consideration. We should not permit any/every web site to read any/every local
file (directly by injecting malicious js code or by cross-site mjsonrpc call).
Access should be limited to files in designated MIDAS experiment subdirectories.
Places like $HOME/.ssh, $HOME/.cache/google-chrome, etc must be protected.
K.O. |