[connections/fix-rdp-auth-issues: 1/3] connection: Never store credentials in plain-text
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [connections/fix-rdp-auth-issues: 1/3] connection: Never store credentials in plain-text
- Date: Fri, 6 Aug 2021 10:06:50 +0000 (UTC)
commit 919ffc0d2736d8e103e7359c65577ecb4505e205
Author: Felipe Borges <felipeborges gnome org>
Date: Fri Aug 6 10:22:41 2021 +0200
connection: Never store credentials in plain-text
src/connection.vala | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/connection.vala b/src/connection.vala
index ebd47cd..122ee56 100644
--- a/src/connection.vala
+++ b/src/connection.vala
@@ -102,8 +102,8 @@ namespace Connections {
private AuthNotification auth_notification = null;
public bool need_password;
public bool need_username;
- public string? username;
- public string? password;
+ public string? username { get; set; }
+ public string? password { get; set; }
protected void handle_auth () {
if (auth_notification != null)
return;
@@ -153,8 +153,13 @@ namespace Connections {
}
public void save (GLib.ParamSpec? pspec = null) {
- if (uuid != null && pspec != null)
+ if (uuid != null && pspec != null) {
+ /* Don't save the credentials in plain text */
+ if (pspec.name == "username" || pspec.name == "password")
+ return;
+
Database.get_default ().save_property (this, pspec.name);
+ }
}
public string get_visible_name () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]