please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

taint() Function

Name

taint() Function---taint a value or window

Availability

Navigator 3.0 with data tainting enabled

Synopsis

taint()
taint(value)

Arguments

value

The value for which a tainted copy is to be made. If this argument is not specified, then taint() adds taint to the current window instead.

Returns

A tainted copy of value, if it is a primitive data type, or a tainted reference to value, if it is an object type.

Description

The taint() 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 have additional sensitive data that is not automatically tainted by JavaScript, you can add taint to it with the taint() function.

taint() does not taint the value it is passed; instead, it returns a tainted copy of that value, or a tainted 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 want to add taint to the entire window in which JavaScript code runs. You can do this by calling taint() with no arguments.

See Also

"untaint()", Chapter 20, JavaScript Security


Previous Home Next
sun Book Index Text

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell

file: /Techref/language/JAVA/SCRIPT/definitive/refp_389.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2024/12/23 12:42,
TOP NEW HELP FIND: 
18.191.91.15: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?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.org/techref/language/JAVA/SCRIPT/definitive/refp_389.htm"> [Chapter 21] Reference: taint()</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .