BUG: "Remote Scripting Error" When Using Page Object DTCID: Q197355
|
When you execute a remote script using the Page Object design time control and passing a string containing the characters "/" and ".", the string might be altered or you might receive the following error:
Remote Scripting Error
REMOTE SCRIPTING ERROR: Page invoked does not support remote scripting.
The string that is passed is interpreted as a path and actually executed as
a path. For example:
"/../" causes the remote scripting error.
"/./" is changed to "/", as well as any repeat of this pattern.
For example, "/./././././" is changed to "/".
Write a function that converts all "/" characters into some nonprintable
character before passing the string and change it back after the function
is called.
For example:
<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>
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
<script language=JavaScript runat=Server>
function function_name(str){ return str; }
</script>
<script language=JavaScript>
Page2.execute.function_name('/../');
</script>
Keywords : kberrmsg kbVisID600bug kbGrpASP kbInetDev
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 7, 1999