Article ID: 197355
Article Last Modified on 3/16/2005
"/../" causes the remote scripting error. "/./" is changed to "/", as well as any repeat of this pattern. For example, "/./././././" is changed to "/".
<script language="JavaScript">
function Encode_String(x){
// Changes the "/" character to the nonprintable ascii code 1.
x=x.replace(/([/]*)+/g, String.fromCharCode(1));
return x;
}
function Decode_String(x){
// Converts the string in the above function back to its original
// form.
var re = new RegExp('(['+ String.fromCharCode(1)+ ']*)+', 'g');
x=x.replace(re, "/");
return x;
}
</script>
<script language=JavaScript runat=Server>
function function_name(str){ return str; }
</script>
<script language=JavaScript>
Page2.execute.function_name('/../');
</script>
Keywords: kberrmsg kbbug kbinetdev kbctrl kbremoteprog kbpending KB197355