Navigator 3.0 when data tainting is enabled
untaint() untaint(value)
The value for which a non-tainted copy is to be made. If this argument is not specified, then untaint() removes taint from the current window instead.
An untainted copy of value, if it is a primitive data type, or an untainted reference to value, if it is an object type.
The untaint() function is used when the data-tainting security model is in effect. See Chapter 20, JavaScript Security for details on this security model. JavaScript automatically associates taint with data values that are potentially private, and which should not be "stolen" by scripts. If you need to allow these values to be exported by scripts, you must use untaint() to make untainted copies.
untaint() does not remove from the taint the value it is passed; instead, it returns an untainted copy of that value, or an untainted reference to that value for object types. (Note that taint is associated with primitive values and with references to objects, not with the objects themselves.)
Sometimes taint is carried not by data values, but by the control flow of a program. In this case, you may need to remove taint from an entire window in which JavaScript code runs. You can do this by calling untaint() with no arguments. Note, however, that you can only do this if the window carries only the taint of the script that calls untaint(). If the window has been tainted by other scripts, it cannot be untainted.
file: /Techref/language/java/script/definitive/refp_417.htm, 5KB, , updated: 2019/10/14 16:00, local time: 2024/8/16 16:06,
18.222.93.219:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/language/java/script/definitive/refp_417.htm"> [Chapter 21] Reference: untaint()</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.