Skip to content
Snippets Groups Projects
Commit cffd69ff authored by rswindell's avatar rswindell
Browse files

Bug-fix: path_info uses back-slashes on Windows.

Display meaningful error if path_info is in unsupported format.
parent e0dc7e46
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@
load("../web/lib/template.ssjs");
load("../web/lib/mime_decode.ssjs");
var path=http_request.path_info.split(/\//);
var path=http_request.path_info.split(/[\\\/]/);
if(path==undefined) {
error("No path info!");
}
......@@ -17,6 +17,10 @@ var sub=path[1];
var id=parseInt(path[2]);
var cid=path[3];
if(sub==undefined || cid==undefined) {
error("Invalid path: " + http_request.path_info);
}
var msgbase = new MsgBase(sub);
if(msgbase.open!=undefined && msgbase.open()==false) {
error(msgbase.last_error);
......
......@@ -7,13 +7,17 @@
load("../web/lib/template.ssjs");
load("../web/lib/mime_decode.ssjs");
var path=http_request.path_info.split(/\//);
var path=http_request.path_info.split(/[\\\/]/);
if(path==undefined) {
error("No path info!");
}
var sub=path[1];
var id=parseInt(path[2]);
if(sub==undefined) {
error("Invalid path: " + http_request.path_info);
}
var msgbase = new MsgBase(sub);
if(msgbase.open!=undefined && msgbase.open()==false) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment