Skip to content

Commit e448bbd

Browse files
committed
Merge branch 'rc' of https://github.com/bexis2/core into rc
2 parents 36845c8 + 0413bab commit e448bbd

File tree

4 files changed

+208
-213
lines changed

4 files changed

+208
-213
lines changed

Components/XML/BExIS.Xml.Helpers/XmlUtility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static bool IsSafeXPath(string xpath)
2222
// Only allow XPaths like /a/b/c or /a[1]/b matches, no function calls, no quotes, etc.
2323
// You can adjust the pattern according to the actual requirements.
2424
// This only allows: /node1/node2/...
25-
var safePattern = @"^(/[a-zA-Z_][\w\-]*(\[\d+\])?)*$";
25+
var safePattern = @"^(/?/?[a-zA-Z_][\w\-]*(\[\d+\])?)*$";
2626
return System.Text.RegularExpressions.Regex.IsMatch(xpath, safePattern);
2727
}
2828

Console/Workspace

0 commit comments

Comments
 (0)