Closed Bug 943276 Opened 11 years ago Closed 7 years ago

Make nsPluginTag::EnsureMembersAreUTF8() not use nsIPlatformCharset

Categories

(Core Graveyard :: Plug-ins, defect, P5)

All
Linux
defect

Tracking

(firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: hsivonen, Assigned: m_kato)

References

Details

Attachments

(1 file)

We don't really support non-UTF-8 system encodings on *nix. In order to get rid of nsIPlatformCharset, we should get rid of nsPluginTag::EnsureMembersAreUTF8(), which, AFAICT, only has effect on
 1) OS/2
 2) *nix systems with a non-UTF-8 system encoding configuration.
Do we know what *nix platforms would be affected here?
This function at least needs to ensure that the strings we get in from plugins are in fact UTF8, and sanitize them if they aren't. We have definitely gotten non-UTF8 strings from Java in the not so distant past, and they were causing aborts.
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #2)
> This function at least needs to ensure that the strings we get in from
> plugins are in fact UTF8, and sanitize them if they aren't. We have
> definitely gotten non-UTF8 strings from Java in the not so distant past, and
> they were causing aborts.

OK. Morphing the bug summary accordingly. It's probably enough for crash avoidance to check if the strings are valid UTF-8 and, if they are not, performing a conversion from windows-1252 to UTF-8 to get *some* strings that are valid UTF-8.

(In reply to Georg Fritzsche [:gfritzsche] from comment #1)
> Do we know what *nix platforms would be affected here?

Not sure. Presumably fringe/legacy configurations of all of them.
Summary: Remove nsPluginTag::EnsureMembersAreUTF8() → Make nsPluginTag::EnsureMembersAreUTF8() not use nsIPlatformCharset
Since we only support Flash, so we can remove nsIPlatformCharset.  Flash is English version only on Linux.
Resolving old bugs which are likely not relevant any more, since NPAPI plugins are deprecated.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
The plugins team is never going to work on this bug. Is it really worth keeping it open?
Priority: -- → P5
(In reply to Benjamin Smedberg [:bsmedberg] from comment #7)
> The plugins team is never going to work on this bug. Is it really worth
> keeping it open?

Yes, this tracks getting rid of nsIPlatformCharset, so it's worth keeping open until this nsIPlatformCharset use has been removed.
Assignee: nobody → m_kato
Comment on attachment 8884706 [details] [diff] [review]
Remove unused nsIPlatfromCharset

After landing bug 1261841, we don't use nsIPlatformCharset on nsPluginTags.  So we should remove unused header.
Attachment #8884706 - Flags: review?(VYV03354)
Attachment #8884706 - Flags: review?(VYV03354) → review+
https://hg.mozilla.org/mozilla-central/rev/ac4eb026e67d
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: