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

callbackDataReceived is never emitted in QOAuthHttpServerReplyHandler

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.0
    • None

    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

        For Gerrit Dashboard: QTBUG-85377
        # Subject Branch Project Status CR V

        Activity

          People

            vuokko Juha Vuolle
            carl Carl Schwan
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change