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

QByteArray::fromPercentEncoding incorrectly decodes strings

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.9.0
    • Core: URL Handling
    • None

    Description

      QByteArray::fromPercentEncoding incorrectly decodes strings which have percentages (%) followed by 2 characters where either character is not a hex digit.

      I.e.

      QByteArray::fromPercentEncoding("%$&")

      returns the character 'f', while it should leave the entire sequence untouched.

       

      This bug happens because the code decodes any sequence following a percentage, while RFC 3986 only says to decode percent-encoded octets (specified to be a percentage followed by two hex digits in section 2.1)

      Attachments

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

        Activity

          People

            manordheim Mårten Nordheim
            manordheim Mårten Nordheim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes