mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 04:43:35 +08:00
Ensuring Base url validaty in general settings
--HG-- branch : dev
This commit is contained in:
@@ -77,7 +77,7 @@ namespace Orchard.Core.Settings.Drivers {
|
||||
|
||||
// ensure the base url is absolute if provided
|
||||
if (!String.IsNullOrWhiteSpace(model.Site.BaseUrl)) {
|
||||
if (!model.Site.BaseUrl.ToLower().StartsWith("http")) {
|
||||
if (!Uri.IsWellFormedUriString(model.Site.BaseUrl, UriKind.Absolute)) {
|
||||
updater.AddModelError("BaseUrl", T("The base url must be absolute."));
|
||||
}
|
||||
// if the base url has been modified, try to ping it
|
||||
|
Reference in New Issue
Block a user