Skip to content

V10: fix build warnings in Web.BackOffice#12479

Merged
Zeegaan merged 7 commits intov10/devfrom
v10/bugfix/fix-build-warnings-in-Web-BackOffice
Jun 20, 2022
Merged

V10: fix build warnings in Web.BackOffice#12479
Zeegaan merged 7 commits intov10/devfrom
v10/bugfix/fix-build-warnings-in-Web-BackOffice

Conversation

@Zeegaan
Copy link
Copy Markdown
Member

@Zeegaan Zeegaan commented May 25, 2022

Notes

Nikolaj Geisle and others added 6 commits May 20, 2022 10:33
…Office

# Conflicts:
#	src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs
#	src/Umbraco.Web.BackOffice/Controllers/BackOfficeServerVariables.cs
#	src/Umbraco.Web.BackOffice/Controllers/CurrentUserController.cs
#	src/Umbraco.Web.BackOffice/Controllers/DataTypeController.cs
#	src/Umbraco.Web.BackOffice/Controllers/TwoFactorLoginController.cs
#	src/Umbraco.Web.BackOffice/Controllers/UsersController.cs
Copy link
Copy Markdown
Contributor

@p-m-j p-m-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have scrolled up and down and it seems reasonable.

…Office

# Conflicts:
#	src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs

var url = string.Format(baseUrl + "css/dashboard.css?section={0}", section);
var key = "umbraco-dynamic-dashboard-css-" + section;
var url = string.Format(baseUrl + "css/dashboard.css?section={0}", section);

Check failure

Code scanning / CodeQL

Uncontrolled format string

[baseUrl](1) flows to here and is used as a format string.

private static HttpClient? _httpClient;
var url = string.Format(
baseUrl + "/Umbraco/Documentation/Lessons/GetContextHelpDocs?sectionAlias={0}&treeAlias={1}", section,

Check failure

Code scanning / CodeQL

Uncontrolled format string

[baseUrl](1) flows to here and is used as a format string.
// Try to clean up the temporary file.
try
{
System.IO.File.Delete(filePath);

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

[User-provided value](1) flows to here and is used in a path.
public IActionResult Import(string file)
{
var filePath = Path.Combine(_hostingEnvironment.MapPathContentRoot(Constants.SystemDirectories.Data), file);
if (string.IsNullOrEmpty(file) || !System.IO.File.Exists(filePath))

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

[User-provided value](1) flows to here and is used in a path.
var requirement = new MediaPermissionsResourceRequirement();
var resource = new MediaPermissionsResource(sorted.ParentId);
AuthorizationResult authorizationResult =
await _authorizationService.AuthorizeAsync(User, resource, requirement);

Check failure

Code scanning / CodeQL

User-controlled bypass of sensitive method

Sensitive method may not be executed depending on [this condition](1), which flows from [user input](2).
{
var user = _backofficeSecurityAccessor.BackOfficeSecurity?.CurrentUser;
_cookieManager.SetCookieValue(Constants.Web.PreviewCookieName, "preview");
return RedirectPermanent($"../../{id}{query}");

Check warning

Code scanning / CodeQL

URL redirection from remote source

Untrusted URL redirection due to [user-provided value](1).
@Zeegaan Zeegaan merged commit e762fa9 into v10/dev Jun 20, 2022
@Zeegaan Zeegaan deleted the v10/bugfix/fix-build-warnings-in-Web-BackOffice branch June 20, 2022 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants