Skip to content

Commit c89e39b

Browse files
fixed another XSS issue
1 parent aa9b7a3 commit c89e39b

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

AjaxPro/Utilities/Constant.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ public sealed class Constant
5252
/// <summary>
5353
/// The assembly version.
5454
/// </summary>
55-
public const string AssemblyVersion = "21.12.21.2";
55+
public const string AssemblyVersion = "21.12.22.1";
5656
}
5757
}

AjaxPro/core.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Object.extend(AjaxPro, {
179179
var d = date.match(/Date\((.*?)\)/)[1];
180180
return "new Date(" + parseInt(d) + ")";
181181
}
182-
else { // ISO Date 2007-12-31T23:59:59Z
182+
/*else { // ISO Date 2007-12-31T23:59:59Z
183183
var matches = date.split(/[-,:,T,Z]/);
184184
if (matches.length == 7) {
185185
matches[1] = (parseInt(matches[1], 0) - 1).toString();
@@ -194,21 +194,17 @@ Object.extend(AjaxPro, {
194194
s += ",";
195195
}
196196
s += parseInt(matches[i], 10);
197+
console.log(s);
197198
}
198199
if (isDate) {
199200
return "new Date(Date.UTC(" + s + "))";
200201
}
201202
}
202-
}
203+
}*/
203204
return str;
204205
},
205206
parse: function (text) {
206-
// not yet possible as we still return new type() JSON
207-
// if (!(!(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
208-
// text.replace(/"(\\.|[^"\\])*"/g, ''))) ))
209-
// throw new Error("Invalid characters in JSON parse string.");
210-
var regEx = /(\"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}.*?\")|(\"\\\/Date\(.*?\)\\\/")/g;
211-
text = text.replace(regEx, this.regExDate);
207+
text = text.replace(/(\"\\\/Date\(\d+\)\\\/")/g, this.regExDate);
212208
return eval('(' + text + ')');
213209
},
214210
m: {

0 commit comments

Comments
 (0)