Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-122642

The SQL QODBC driver implementation fails to escape passwords set with setPassword(...) when using special characters.

XMLWordPrintable

    • Windows
    • 000d462bf (dev), 0b5b6e7db (6.7), 38277a88f (dev), d10cba961 (6.9), e43f6d708 (6.8), d2cd406b3 (dev), deda96666 (6.10), bae157261 (6.9), 022bb08ac (tqtc/lts-6.8)

      The SQL QODBC driver implementation fails to escape passwords set with setPassword(...). Authentication fails when using a password with special characters like ";". However, when wrapping the password inside { }, authentication succeeds.

      Proper escaping should be done in the driver implementation.

      To reproduce the issue:

      1. Create a test database with Microsoft SQL Server.
      2. Ensure that your database accepts SQL Server and Windows Authentication mode.
      3. Create a user and ensure that their password contains ";".
      4. Edit the values in the attached example project to match your database information and user credentials.
      5. Run the attached example project.

        1. sqlproject.zip
          0.9 kB
          Mehdi Belila
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            chehrlic Christian Ehrlicher
            mahdi.belila Mehdi Belila
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: