Android WebView 是否加密保存的密码?
我们希望发布一个应用程序,它只是一个指向我们受密码保护的移动网站的 WebView。目前我们计划允许用户访问 WebView 的“保存密码”功能,但我不确定这是否安全。
如果密码没有加密且安全地存储,那么我们将不得不暂时拒绝对该功能的访问,并在以后开发更长期的解决方案。
那么,问题是,通过 Android 上的 WebView 保存密码是否加密/安全?
We have an app that we are looking to release that is just a WebView that points to our mobile site which is password protected. Currently we plan to allow users access to the "save password" functionality of the WebView but I'm not sure if that is safe.
If the password is not stored encrypted and securely, then we will have to simply deny access to that feature for now and develop a more long term solution later.
So, the question is, is saving a password via a WebView on android encrypted / secure?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,它不安全。
密码以纯文本形式存储在数据库中(它们甚至没有经过哈希处理!),因此如果用户拥有 root 设备(或使用模拟器),那么他就能够进入数据库并窃取给定站点存储的密码。
我在存储 WebView 密码时遇到了类似的问题,并且我做到了,但它需要 WebKit 重新编译并使用启用了加密的自定义 sqlitedb.so 二进制文件。如果存储密码不是您正在开发的应用程序的首要用例,我不会推荐这样做。付出太多却收获甚少。
No, it is not secure.
Password is stored in plain text (they are not even hashed!) in the database, so if a user has a rooted device (or uses an emulator) then he is able to get into the database and steal stored passwords for given sites.
I had similar problem with storing WebView passwords and I did it, but it required WebKit recompilation and usage of custom sqlitedb.so binary that has encryption enabled. I wouldn't recommend this if storing passwords is not the top use case for app you are developing. Too much effort with a little gain.