Only add InternalStageAuthToken if URI isn't pointing to a file

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
Danilo Del Busso 2023-03-30 13:31:06 +01:00
parent 732d1f4a30
commit a888ed9274
No known key found for this signature in database

View File

@ -343,11 +343,8 @@ namespace XenAdmin.Actions
{
var checkForUpdatesXml = new XmlDocument();
var checkForUpdatesUrl = XenAdminConfigManager.Provider.GetCustomUpdatesXmlLocation() ?? BrandManager.UpdatesUrl;
var authToken = XenAdminConfigManager.Provider.GetInternalStageAuthToken();
var uriBuilder = new UriBuilder(checkForUpdatesUrl);
uriBuilder.Query = AddAuthTokenToQueryString(authToken, uriBuilder.Query);
var uri = uriBuilder.Uri;
if (uri.IsFile)
{
@ -355,7 +352,9 @@ namespace XenAdmin.Actions
}
else
{
var authToken = XenAdminConfigManager.Provider.GetInternalStageAuthToken();
uriBuilder.Query = AddAuthTokenToQueryString(authToken, uriBuilder.Query);
var proxy = XenAdminConfigManager.Provider.GetProxyFromSettings(Connection, false);
using (var webClient = new WebClient())