Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. First letter of password becomes upper cased when using yubi key

First letter of password becomes upper cased when using yubi key

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 261 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SamVDB
    wrote on last edited by
    #1

    Hello,

    I'm having a strange issue with Qt5 on Ubuntu 20.04 in combination with a static password configured from a Yubi Key. When entering text in a text field, if you first press any key on the keyboard followed by press on the yubi key (which triggers entering the configured password), the first letter of the password could have incorrect letter casing. This happens if a password has a lower case as first letter followed by upper case letters (e.g. "qQQ"). Subsequent presses on the yubi key then do enter the correct password. It's only when first pressing a key on the keyboard followed by pressing the yubi key that converts the first lower case letter into an upper case.

    I contacted Yubi support but they say that the yubi key always produces the same scan codes and that it's not aware of any keyboard modifiers. Because of this I did another test by connecting 2 usb keyboards to my computer. When randomly pressing keys on both keyboards, you clearly see at some point some freezes. This makes me think there might be some kind of race condition going on somewhere.

    This issue only pops up in any Qt based application like QtCreator, KeepassXC, Wireshark, a custom application, ... It can be triggered in any text field of these applications. However I cannot trigger it in any non-Qt based application.

    So far I tried some debugging with xtrace and evtest but without any result. What I did notice is that when first pressing a key on the keyboard followed by pressing the yubi key, xtrace reported some "DeviceChanged" events. Maybe there is an issue with handling that event? I don't know.

    One more thing I'd like to add, after testing on different systems ( all Ubuntu 20.04 ), it turns out that the issue also depends on the load of the system. On one system the issue almost always happens. On another system it almost never happens unless we run the stress tool. Then it also happens almost always.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SamVDB
      wrote on last edited by
      #4

      For anyone who encounters the same issue, it was a bug in the Qt QPA X11/XCB. See this issue: https://bugreports.qt.io/browse/QTBUG-95933 .

      1 Reply Last reply
      3
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi and welcome to devnet,

        Can you provide a minimal compilable example that shows this behaviour ?

        Which version of Qt are you using ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SamVDB
          wrote on last edited by
          #3

          Hi SGaist,

          I created a demo project which you can find here: https://github.com/S4mw1s3/YubiIssue
          Not sure however if this is what you meant. In fact you can use any Qt application you want.

          Qt version is standard Ubuntu 20.04 version which is 5.12.8 (https://packages.ubuntu.com/focal/qt5-default)

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SamVDB
            wrote on last edited by
            #4

            For anyone who encounters the same issue, it was a bug in the Qt QPA X11/XCB. See this issue: https://bugreports.qt.io/browse/QTBUG-95933 .

            1 Reply Last reply
            3

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved