mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +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
|
// ensure the base url is absolute if provided
|
||||||
if (!String.IsNullOrWhiteSpace(model.Site.BaseUrl)) {
|
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."));
|
updater.AddModelError("BaseUrl", T("The base url must be absolute."));
|
||||||
}
|
}
|
||||||
// if the base url has been modified, try to ping it
|
// if the base url has been modified, try to ping it
|
||||||
|
|||||||
Reference in New Issue
Block a user