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

callbackDataReceived is never emitted in QOAuthHttpServerReplyHandler

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.0
    • None
    • All

    Description

      The signal callbackDataReceived is never emitted in QOAuthHttpServerReplyHandler. This is normally not used because callbackReceived is a better signal to use. But in some cases, like GitLab oauth2 provider, the callback URL is malformatted (use a '#' instead of '?' for the query parameters).

      This should be easy to fix with the following trivial patch. (not tested)

      --- a/src/oauth/qoauthhttpserverreplyhandler.cpp
      +++ b/src/oauth/qoauthhttpserverreplyhandler.cpp
      @@ -114,6 +114,7 @@ void QOAuthHttpServerReplyHandlerPrivate::_q_answerClient(QTcpSocket *socket, co
      if (!url.path().startsWith(QLatin1String("/") + path)) {
      qCWarning(lcReplyHandler, "Invalid request: %s", qPrintable(url.toString()));
      } else {
      + Q_EMIT q->callbackDataReceived(url.toEncoded());
      QVariantMap receivedData;
      const QUrlQuery query(url.query());
      const auto items = query.queryItems();
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jefernan Jesus Fernandez
            carl Carl Schwan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes