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

No error reported if QOAuthHttpServerReplyHandler cannot bind to the specified port

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.8, 5.9.0, 5.10.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      I might be missing something, but as for as I can tell, if QOAuthHttpServerReplyHandler cannot bind to the specified port, no error is reported.

      Example

      Run an application that start an OAuth authorization. After the browser/webview is opened do not login, but start a second instance of your application. In this instance also start the OAuth authorization.

      Expected behavior

      The signal QAbstractOAuth2::error or some other error signal is emitted

      Actual behavior

      No signal is emitted, but the OAuth flow just continues with http://localhost:0/ (so with port 0) as the redirect URI being specified in the authorization URL.

      QOAuthHttpServerReplyHandler::isListening() does correctly return false, and QOAuthHttpServerReplyHandler::port() returns 0.

        Attachments

        1. main.cpp
          1 kB
        2. qtoauth.pro
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              jefernan Jesus Fernandez
              Reporter:
              jharmannij jharmannij
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes