User settings files added in compiled exe

4 次查看(过去 30 天)
Hello,
When one compiles a Matlab code to a standalone app using the Matlab Compiler, a lot of files are automatically added in the executable file. I found out recently that lots of these files are readable (ascii files or mat-files) and contain data that are specific to my user profile. For example a file called matlabprefs.mat in the .matlab folder of the executable archive is a standard mat-file. It contains several Matlab settings in a structure called Preferences.
The most sensitive data is the Preferences.Internet! It contains the account I have set to send emails, especially a clear text password!
>> Preferences
Preferences =
struct with fields:
profiler: [1×1 struct]
MATLABZoom: [1×1 struct]
Mathworks_uisetcolor: [1×1 struct]
cameratoolbar: [1×1 struct]
hg: [1×1 struct]
Internet: [1×1 struct]
>> Preferences.Internet
ans =
struct with fields:
E_mail: '------'
SMTP_Server: '------'
SMTP_Username: '------'
SMTP_Password: '------'
In my opinion that is completely insane. People should be aware of this behavior of the Matlab Compiler. The default should be not to include any user settings in the executable. And, only in case the developer wants or has to include his settings in the compiled app, there should be an option.
The workaround I use is to remove or replace these sensitive files with dummy ones in the executable archive before sending my standalone app to users.
Regards,
Luc Masset
  1 个评论
Dave Watson
Dave Watson 2020-7-22
编辑:Dave Watson 2020-7-22
I agree it is insane. Not only that but is is not made clear in the documentation.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

产品


版本

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by