Skip to content

Commit

Permalink
Update regex to resolve security alert (#114)
Browse files Browse the repository at this point in the history
* Update Const.java

* Update Const.java

* Update Const.java

* Update Const.java
  • Loading branch information
zhou9584 committed Nov 3, 2022
1 parent 3bfe51a commit 335b03b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ interface RegexString {
String COMMON_STR = "\\w*";
// HTTP url e.g. /api/auth
String URL = "(/[A-Za-z0-9_.-]*)*";
String MAIL_ADDRESS = "[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$";
String MAIL_ADDRESS = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";

//File path
String LINUX_PATH = "^\\/([^\\/]+\\/?)*$";
String LINUX_PATH = "^\\/([\\w]\\/?)+$";
String WINDOWS_PATH = "^([a-zA-Z]:)(\\\\[^/\\\\:*?\"<>|]+\\\\?)*$";

//Package name
String PACKAGE_NAME = "[a-zA-Z]+[0-9a-zA-Z_]*(\\.[a-zA-Z]+[0-9a-zA-Z_]*)*";
String PACKAGE_NAME = "\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
}

interface PermissionType {
Expand Down

0 comments on commit 335b03b

Please sign in to comment.