J
JRough
Somehow when I send the url to the javascript form to get converted to
a post , something adds a %22 to all the parenthesis in my serialized
string unless I escape it. So here is the string escaped. If I allow
the parens to turn into %22 then php can't unserialize it.
file:///Tiger_HD/Library/WebServer/Documents/clientsidepost2.html?q=a:3:{i:0;s:49:\"44502%20Loneoak%2C%20Lancaster%2C%20CA%2C%2093534\";i:1;s:50:\"3537%203rd%20St%2C%20Ridgefield%2C%20WA%2C%2098642\";i:2;s:58:\"931%20Alabama%20St%2C%20san%20francisco%2C%20CA%2C%2094110\";}
So in this conversion js form I need it to strip the slashes but I get
these errors in the console:
---------errors--------------
Error: Permission denied to call method Location.toString
Error: Permission denied to call method Location.toString
Source File: http://ds.serving-sys.com/BurstingCachedScripts/ebBanner_3_0_50.js
Line: 1
Error: Permission denied to call method Location.toString
Error: Permission denied to call method Location.toString
Error: str.replace is not a function
Source File:
file:///Tiger_HD/Library/WebServer/Documents/clientsidepost2.html?q=a:3:{i:0;s:49:\%2244502%20Loneoak%2C%20Lancaster%2C%20CA%2C%2093534\%22;i:1;s:50:\%223537%203rd%20St%2C%20Ridgefield%2C%20WA%2C%2098642\%22;i:2;s:58:\%22931%20Alabama%20St%2C%20san%20francisco%2C%20CA%2C%2094110\%22;}
Line: 21
Can you tell me how to fix the stripslashes function?tnx,
---clientsidepost.html--------------------
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-10646-1">
<title>Get to Post Proxy</title>
<script type ="text/javascript">
function Get2Post() {
var frm = document.forms['pgform'];
var q = window.location.search.substring(1).split('=');
stripslashes(q);
frm.elements['q'].value = decodeURIComponent(q[1]);
document.write(q);
frm.submit();
}
function stripslashes(str) {
str=str.replace(/\\'/g,'\'');
str=str.replace(/\\"/g,'"');
str=str.replace(/\\0/g,'\0');
str=str.replace(/\\\\/g,'\\');
return str;
}
window.onload = Get2Post;
</script>
</head>
<body>
<form name="pgform"
action="http://99.20.131.64/pooglemap2.php"
method="post">
<input type="hidden" name="q">
</form>
</body>
</html>
a post , something adds a %22 to all the parenthesis in my serialized
string unless I escape it. So here is the string escaped. If I allow
the parens to turn into %22 then php can't unserialize it.
file:///Tiger_HD/Library/WebServer/Documents/clientsidepost2.html?q=a:3:{i:0;s:49:\"44502%20Loneoak%2C%20Lancaster%2C%20CA%2C%2093534\";i:1;s:50:\"3537%203rd%20St%2C%20Ridgefield%2C%20WA%2C%2098642\";i:2;s:58:\"931%20Alabama%20St%2C%20san%20francisco%2C%20CA%2C%2094110\";}
So in this conversion js form I need it to strip the slashes but I get
these errors in the console:
---------errors--------------
Error: Permission denied to call method Location.toString
Error: Permission denied to call method Location.toString
Source File: http://ds.serving-sys.com/BurstingCachedScripts/ebBanner_3_0_50.js
Line: 1
Error: Permission denied to call method Location.toString
Error: Permission denied to call method Location.toString
Error: str.replace is not a function
Source File:
file:///Tiger_HD/Library/WebServer/Documents/clientsidepost2.html?q=a:3:{i:0;s:49:\%2244502%20Loneoak%2C%20Lancaster%2C%20CA%2C%2093534\%22;i:1;s:50:\%223537%203rd%20St%2C%20Ridgefield%2C%20WA%2C%2098642\%22;i:2;s:58:\%22931%20Alabama%20St%2C%20san%20francisco%2C%20CA%2C%2094110\%22;}
Line: 21
Can you tell me how to fix the stripslashes function?tnx,
---clientsidepost.html--------------------
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-10646-1">
<title>Get to Post Proxy</title>
<script type ="text/javascript">
function Get2Post() {
var frm = document.forms['pgform'];
var q = window.location.search.substring(1).split('=');
stripslashes(q);
frm.elements['q'].value = decodeURIComponent(q[1]);
document.write(q);
frm.submit();
}
function stripslashes(str) {
str=str.replace(/\\'/g,'\'');
str=str.replace(/\\"/g,'"');
str=str.replace(/\\0/g,'\0');
str=str.replace(/\\\\/g,'\\');
return str;
}
window.onload = Get2Post;
</script>
</head>
<body>
<form name="pgform"
action="http://99.20.131.64/pooglemap2.php"
method="post">
<input type="hidden" name="q">
</form>
</body>
</html>