Search Unity

Using GUIUtility.systemCopyBuffer causes iOS 14 to show "App A pasted from App B"

Discussion in 'UGUI & TextMesh Pro' started by MaggerFabio, Sep 22, 2020.

  1. MaggerFabio

    MaggerFabio

    Joined:
    Oct 17, 2017
    Posts:
    11
    We got a report from a user that is concerned about security issues as opening a game showed a message like "Game pasted from Bank App" at startup, without user input, which seems to be related to the use of
    GUIUtility.systemCopyBuffer
    and iOS 14 privacy updates.
    This is a major issue, has anyone else seen this? It seems TMP InputField uses this, could it be the cause?
     
    Last edited: Sep 22, 2020
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Was just notified of this post. The TMP Input Field does indeed use the GUIUtility.systemCopyBuffer to allow users to copy / paste text from their system to the input field.

    Since the Input field simply uses this existing API in Unity, I will track down whoever owns this API to see how they plan to address this concern.

    In the meantime, you could modify the TMP_InputField.cs to remove the use of GUIUtility.systemCopyBuffer. Make the following changes around line 1338.

    Code (csharp):
    1.  
    2. static string clipboard
    3. {
    4.     get
    5.     {
    6.         return string.Empty;
    7.     }
    8.     set    {  }
    9. }
    10.  
    You will need to make these changes in the Global package cache.
     
    MaggerFabio likes this.