BUG: FIX: VBScript Can Corrupt Data Stored in Scripting Dictionary Object (216279)
The information in this article applies to:
- Microsoft Visual Basic, Scripting Edition 3.0
- Microsoft Visual Basic, Scripting Edition 4.0
- Microsoft Active Server Pages
- the operating system: Microsoft Windows 98
- the operating system: Microsoft Windows 95
- the operating system: Microsoft Windows NT 4.0
This article was previously published under Q216279 SYMPTOMS
If you assign Request.Form or QueryString items in a Scripting Dictionary object cached in Session scope, you will corrupt your data. Corrupted data will manifest either as empty fields (that is, blank individual dictionary items) or as items containing garbage text.
CAUSE
VBScript does not use IDispatch to fetch the Response object's default property. This results in an object reference being assigned to an Item in the Dictionary (even when the assignment in your script does not use the Set statement). When this object reference is then cached with Session scope, a related bug in Active Server Pages (ASP) doesn't catch and block the object reference (see
216825 "BUG: Assignment of Multi-valued Objects in Request Object Causes Corruption in Scripting Dictionary" for details).
RESOLUTION
The solution is to ensure that only string values are stored in Dictionaries. The most reliable way to ensure only strings are used is to explicitly reference the Item property of all elements in a Request object. Special consideration must be given to multivalued named items as described above (see the code in the MORE INFORMATION section below for an example, and reference 216825 "BUG: Assignment of Multi-valued Objects in Request Object Causes Corruption in Scripting Dictionary".
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Microsoft Internet Explorer 5. REFERENCES
For additional information, please see the following article in the Microsoft Knowledge Base: 216825 BUG: Assignment of Multi-valued Objects in Request Object Causes Corruption in Scripting Dictionary
Modification Type: | Major | Last Reviewed: | 11/26/2003 |
---|
Keywords: | kbASP400fix kbASPObj kbBug kbfix kbie500fix KB216279 |
---|
|