Closed Bug 199163 Opened 22 years ago Closed 22 years ago

[AxPlugin] Remove clever type conversion on PARAM properties

Categories

(Core Graveyard :: Embedding: APIs, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adamlock, Assigned: adamlock)

References

Details

Attachments

(1 file)

The plugin should not turn PARAMs like this into numbers: <param name="SessionID" value="0000455661519383483"> LegacyPlugin.cpp has code which uses the Win32 call VariantChangeType to store params as numbers if they can be coerced that way. Some controls don't like this at all (e.g. the upload control on shutterfly.com) and crash or go wrong. The plugin should should probably hold all params as simple strings. If the calling control wants the value as a certain type it can explicitly ask when it calls IPropertyBag::Read
QA Contact: carosendahl → ashishbhatt
Attached patch PatchSplinter Review
I have verified that Internet Explorer doesn't bother to change the type of PARAM name/value pairs, leaving them all as strings. This is true for bools, ints, doubles and presumably more esoteric types too. This patch replicates that behaviour, removing the code that attempts to cast the value into its native type and just holds them as string values. This means controls expecting some large session id number string, e.g. "0000398247238974234987" cannot be shocked into crashing when they receive a double or when the double converted to a string loses the original formatting, e.g. getting back "3.98247238974234987e+17"
Comment on attachment 118655 [details] [diff] [review] Patch Requesting r/sr on this simple patch to store PARAM values as strings rather than try to convert them to other types first.
Attachment #118655 - Flags: superreview?(alecf)
Attachment #118655 - Flags: review?(dbradley)
Comment on attachment 118655 [details] [diff] [review] Patch r=dbradley
Attachment #118655 - Flags: review?(dbradley) → review+
Comment on attachment 118655 [details] [diff] [review] Patch that's easy. sr=alecf
Attachment #118655 - Flags: superreview?(alecf) → superreview+
Comment on attachment 118655 [details] [diff] [review] Patch Requesting 1.4a checkin approval. Simple fix, obvious, activex specific.
Attachment #118655 - Flags: approval1.4a?
Comment on attachment 118655 [details] [diff] [review] Patch please land first thing in beta. thanks.
Attachment #118655 - Flags: approval1.4a? → approval1.4a-
Fix is checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: