View Issue Details

IDProjectCategoryView StatusLast Update
0003263NoesisGUIUnitypublic2024-06-13 01:58
ReporterJosh Campbell Assigned Tojsantos  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Product Version3.2.2 
Target Version3.2.4Fixed in Version3.2.4 
Summary0003263: Text is saved in text box and there's no way to change this
Description

Whenever adding text to a textbox it caches the text. This is bad for security when using custom password boxes that use a TextBox component.

Proposed solution: Use InputScore to set is as password (Noesis would need to create a private input score) to use and set the autocomplete to false; (Code in the thread Tommy Dawkins posted in the forum)

https://www.noesisengine.com/forums/viewtopic.php?t=3285

PlatformAny

Activities

jsantos

jsantos

2024-06-13 01:56

manager   ~0009699

Last edited: 2024-06-13 01:58

The following patch, sets autocorrection to "false" in Unity TouchScreenKeyboard, when InputScope is set to "Password".

It also adds support for the Placeholder property of TextBox and PasswordBox.


Index: NoesisUnity.cs

--- NoesisUnity.cs (revision 14080)
+++ NoesisUnity.cs (working copy)
@@ -459,9 +459,11 @@
public static void Open(UIElement focused_)
{
string text = "";

  • string textPlaceholder = "";
    TouchScreenKeyboardType keyboardType = TouchScreenKeyboardType.Default;
    bool multiline = false;
    bool secure = false;
  • bool autocorrection = true;
    int characterLimit = 0;

         if (focused_ is FrameworkElement)

    @@ -490,6 +492,9 @@
    case InputScope.RegularExpression:
    keyboardType = TouchScreenKeyboardType.Search;
    break;

  • case InputScope.Password:
  • autocorrection = false;
  • break;
    default:
    keyboardType = TouchScreenKeyboardType.Default;
    break;
    @@ -502,6 +507,7 @@
    if (textBox != null)
    {
    text = textBox.Text;
  • textPlaceholder = textBox.Placeholder;
    multiline = textBox.TextWrapping == TextWrapping.Wrap && textBox.AcceptsReturn;
    characterLimit = textBox.MaxLength;
    }
    @@ -508,6 +514,7 @@
    else if (passwordBox != null)
    {
    text = passwordBox.Password;
  • textPlaceholder = passwordBox.Placeholder;
    secure = true;
    }

@@ -514,9 +521,9 @@
TouchScreenKeyboard keyboard_;

       #if UNITY_2018_1_OR_NEWER
  • keyboard_ = TouchScreenKeyboard.Open(text, keyboardType, true, multiline, secure, false, "", characterLimit);
  • keyboard_ = TouchScreenKeyboard.Open(text, keyboardType, autocorrection, multiline, secure, false, textPlaceholder, characterLimit);
    #else
  • keyboard_ = TouchScreenKeyboard.Open(text, keyboardType, true, multiline, secure, false, "");
  • keyboard_ = TouchScreenKeyboard.Open(text, keyboardType, autocorrection, multiline, secure, false, textPlaceholder);
    #endif

         if (keyboard_.status == TouchScreenKeyboard.Status.Visible)

jsantos

jsantos

2024-06-13 01:58

manager   ~0009700

The patch will be available in 3.2.4.

We have considered adding a separate property for driving this but we were not sure about it.

If you are not satisfied with this solution, please reopen the ticket.

Issue History

Date Modified Username Field Change
2024-04-23 16:46 Josh Campbell New Issue
2024-04-24 12:07 jsantos Assigned To => jsantos
2024-04-24 12:07 jsantos Status new => assigned
2024-04-24 12:07 jsantos Target Version => 3.2.4
2024-06-13 01:56 jsantos Note Added: 0009699
2024-06-13 01:58 jsantos Status assigned => resolved
2024-06-13 01:58 jsantos Resolution open => fixed
2024-06-13 01:58 jsantos Fixed in Version => 3.2.4
2024-06-13 01:58 jsantos Note Added: 0009700
2024-06-13 01:58 jsantos Note Edited: 0009699
2025-10-10 13:29 jsantos Category Unity3D => Unity