Skip to content

Commit 8c822c5

Browse files
committed
Merge remote-tracking branch 'origin/v8/8.17' into v8/dev
# Conflicts: # src/Umbraco.Core/Sync/ApplicationUrlHelper.cs # src/Umbraco.Web/Editors/AuthenticationController.cs # src/Umbraco.Web/Editors/UsersController.cs
2 parents 56d54d4 + c793801 commit 8c822c5

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

src/SolutionInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
[assembly: AssemblyVersion("8.0.0")]
1919

2020
// these are FYI and changed automatically
21-
[assembly: AssemblyFileVersion("8.17.1")]
22-
[assembly: AssemblyInformationalVersion("8.17.1")]
21+
[assembly: AssemblyFileVersion("8.17.2")]
22+
[assembly: AssemblyInformationalVersion("8.17.2")]

src/Umbraco.Core/Sync/ApplicationUrlHelper.cs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,25 @@ public static string GetApplicationUrlFromCurrentRequest(HttpRequestBase request
112112
/// <returns></returns>
113113
public static Uri GetApplicationUriUncached(
114114
HttpRequestBase request,
115-
IUmbracoSettingsSection umbracoSettingsSection)
115+
IUmbracoSettingsSection umbracoSettingsSection,
116+
IGlobalSettings globalSettings)
116117
{
117118
var settingUrl = umbracoSettingsSection.WebRouting.UmbracoApplicationUrl;
118-
return string.IsNullOrEmpty(settingUrl)
119-
? new Uri(request.Url, IOHelper.ResolveUrl(SystemDirectories.Umbraco))
120-
: new Uri(settingUrl);
119+
120+
121+
if (string.IsNullOrEmpty(settingUrl))
122+
{
123+
if (!Uri.TryCreate(request.Url, VirtualPathUtility.ToAbsolute(globalSettings.Path), out var result))
124+
{
125+
throw new InvalidOperationException(
126+
$"Could not create an url from {request.Url} and {globalSettings.Path}");
127+
}
128+
return result;
129+
}
130+
else
131+
{
132+
return new Uri(settingUrl);
133+
}
121134
}
122135
}
123136
}

src/Umbraco.Web.UI/Umbraco.Web.UI.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@
348348
<WebProjectProperties>
349349
<UseIIS>False</UseIIS>
350350
<AutoAssignPort>True</AutoAssignPort>
351-
<DevelopmentServerPort>8171</DevelopmentServerPort>
351+
<DevelopmentServerPort>8172</DevelopmentServerPort>
352352
<DevelopmentServerVPath>/</DevelopmentServerVPath>
353-
<IISUrl>http://localhost:8171</IISUrl>
353+
<IISUrl>http://localhost:8172</IISUrl>
354354
<NTLMAuthentication>False</NTLMAuthentication>
355355
<UseCustomServer>False</UseCustomServer>
356356
<CustomServerUrl>
@@ -433,4 +433,4 @@
433433
<Message Text="ConfigFile: $(OriginalFileName) -&gt; $(OutputFileName)" Importance="high" Condition="Exists('$(ModifiedFileName)')" />
434434
<Copy SourceFiles="$(ModifiedFileName)" DestinationFiles="$(OutputFileName)" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="Exists('$(ModifiedFileName)')" />
435435
</Target>
436-
</Project>
436+
</Project>

src/Umbraco.Web/Editors/AuthenticationController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ private string ConstructCallbackUrl(int userId, string code)
566566
});
567567

568568
// Construct full URL using configured application URL (which will fall back to current request)
569-
var applicationUri = ApplicationUrlHelper.GetApplicationUriUncached(http.Request, _umbracoSettingsSection);
569+
var applicationUri = ApplicationUrlHelper.GetApplicationUriUncached(http.Request, _umbracoSettingsSection, GlobalSettings);
570570
var callbackUri = new Uri(applicationUri, action);
571571
return callbackUri.ToString();
572572
}

src/Umbraco.Web/Editors/UsersController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ private async Task SendUserInviteEmailAsync(UserBasic userDisplay, string from,
540540
});
541541

542542
// Construct full URL will use the value in settings if specified, otherwise will use the current request URL
543-
var requestUrl = ApplicationUrlHelper.GetApplicationUriUncached(http.Request, _umbracoSettingsSection);
543+
var requestUrl = ApplicationUrlHelper.GetApplicationUriUncached(http.Request, _umbracoSettingsSection, GlobalSettings);
544544
var inviteUri = new Uri(requestUrl, action);
545545

546546
var emailSubject = Services.TextService.Localize("user", "inviteEmailCopySubject",

0 commit comments

Comments
 (0)