Quellcode durchsuchen

[RN] Secure entry, no automatic correction for room-lock passwords

master
Lyubo Marinov vor 8 Jahren
Ursprung
Commit
3d32c2de89

+ 1
- 0
react/features/base/dialog/components/Dialog.native.js Datei anzeigen

112
                 placeholder = { t(bodyKey) }
112
                 placeholder = { t(bodyKey) }
113
                 submitButtonTextStyle = { submitButtonTextStyle }
113
                 submitButtonTextStyle = { submitButtonTextStyle }
114
                 submitText = { t(okTitleKey) }
114
                 submitText = { t(okTitleKey) }
115
+                textInputProps = { this.props.textInputProps }
115
                 title = { titleString || t(titleKey) }
116
                 title = { titleString || t(titleKey) }
116
                 visible = { true } />
117
                 visible = { true } />
117
         );
118
         );

+ 10
- 0
react/features/room-lock/components/PasswordRequiredPrompt.native.js Datei anzeigen

21
     dispatch: Dispatch<*>
21
     dispatch: Dispatch<*>
22
 };
22
 };
23
 
23
 
24
+/**
25
+ * The style of the {@link TextInput} rendered by
26
+ * {@code PasswordRequiredPrompt}. As it requests the entry of a password, the
27
+ * entry should better be secure.
28
+ */
29
+const _TEXT_INPUT_PROPS = {
30
+    secureTextEntry: true
31
+};
32
+
24
 /**
33
 /**
25
  * Implements a React {@code Component} which prompts the user when a password
34
  * Implements a React {@code Component} which prompts the user when a password
26
  * is required to join a conference.
35
  * is required to join a conference.
62
                 bodyKey = 'dialog.passwordLabel'
71
                 bodyKey = 'dialog.passwordLabel'
63
                 onCancel = { this._onCancel }
72
                 onCancel = { this._onCancel }
64
                 onSubmit = { this._onSubmit }
73
                 onSubmit = { this._onSubmit }
74
+                textInputProps = { _TEXT_INPUT_PROPS }
65
                 titleKey = 'dialog.passwordRequired' />
75
                 titleKey = 'dialog.passwordRequired' />
66
         );
76
         );
67
     }
77
     }

+ 11
- 0
react/features/room-lock/components/RoomLockPrompt.native.js Datei anzeigen

8
 
8
 
9
 import { endRoomLockRequest } from '../actions';
9
 import { endRoomLockRequest } from '../actions';
10
 
10
 
11
+/**
12
+ * The style of the {@link TextInput} rendered by {@code RoomLockPrompt}. As it
13
+ * requests the entry of a password, {@code TextInput} automatically correcting
14
+ * the entry of the password is a pain to deal with as a user.
15
+ */
16
+const _TEXT_INPUT_PROPS = {
17
+    autoCapitalize: 'none',
18
+    autoCorrect: false
19
+};
20
+
11
 /**
21
 /**
12
  * Implements a React Component which prompts the user for a password to lock  a
22
  * Implements a React Component which prompts the user for a password to lock  a
13
  * conference/room.
23
  * conference/room.
54
                 bodyKey = 'dialog.passwordLabel'
64
                 bodyKey = 'dialog.passwordLabel'
55
                 onCancel = { this._onCancel }
65
                 onCancel = { this._onCancel }
56
                 onSubmit = { this._onSubmit }
66
                 onSubmit = { this._onSubmit }
67
+                textInputProps = { _TEXT_INPUT_PROPS }
57
                 titleKey = 'toolbar.lock' />
68
                 titleKey = 'toolbar.lock' />
58
         );
69
         );
59
     }
70
     }

Laden…
Abbrechen
Speichern