[Webkit-unassigned] [Bug 132270] New: Settings::setDefaultTextEncodingName() allows to set unsupported encoding

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 28 07:21:23 PDT 2014


           Summary: Settings::setDefaultTextEncodingName() allows to set
                    unsupported encoding
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Page Loading
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: g.czajkowski at samsung.com

JavaScript interface does not allow to set the encoding which is not supported by WebKit, for example:

document.charset = "FooBar"; // won't take effect

However, all WebKit ports expose an additional API to set default text encoding. This API mostly uses Settings::setDefaultTextEncodingName() which doesn't ensure correctness of the given encoding name.
What's more, it seems that all methods which use the defaultTextEncodingName() do not take it into consideration if it's wrong, for example:

1) request.setResponseContentDispositionEncodingFallbackArray("UTF-8", m_frame.document()->encoding(), m_frame.settings().defaultTextEncodingName())
2) TextResourceDecoder::TextResourceDecoder(const String& mimeType, const TextEncoding& specifiedDefaultEncoding, ....) {
   m_encoding(defaultEncoding(m_contentType, specifiedDefaultEncoding)) -> will be converted to Latin1 if (!specifiedDefaultEncoding.isValid()

Due to this change will affect all WebKit ports I wonder if there are objections to prevent setting the encoding which is not supported by WebKit.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list