diff --git a/app-center-services/src/main/java/org/exoplatform/appcenter/service/ApplicationCenterService.java b/app-center-services/src/main/java/org/exoplatform/appcenter/service/ApplicationCenterService.java index 0e5ea2d65..d3c521d79 100644 --- a/app-center-services/src/main/java/org/exoplatform/appcenter/service/ApplicationCenterService.java +++ b/app-center-services/src/main/java/org/exoplatform/appcenter/service/ApplicationCenterService.java @@ -822,7 +822,7 @@ private List getApplications(String keyword, String username) throw private boolean isUrlValid(String url) { //[-a-zA-Z0-9@:%._\\\\/+~#=] allowed characters - String regex = "(http(s)?:\\/\\/.)[-a-zA-Z0-9@:%._\\\\/+~#=?&]{2,256}"; + String regex = "([a-zA-Z0-9-@:._\\/?&]+:\\/\\/)?http(s)?:\\/\\/[-a-zA-Z0-9@:%._\\\\/+~#=?&]{2,256}"; Pattern pattern = Pattern.compile(regex); return url != null && !url.isBlank() && (url.startsWith("/portal/") || url.startsWith("./") || pattern.matcher(url).matches()); }