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

QByteArray::fromPercentEncoding incorrectly decodes strings

XMLWordPrintable

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

      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)

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes