V10: fix build warnings in Web.BackOffice#12479
Merged
Conversation
…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
This was referenced May 30, 2022
p-m-j
approved these changes
Jun 14, 2022
Contributor
p-m-j
left a comment
There was a problem hiding this comment.
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
|
|
||
| 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
| // Try to clean up the temporary file. | ||
| try | ||
| { | ||
| System.IO.File.Delete(filePath); |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression
| 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
| 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
| { | ||
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notes
string.Substring(1)intostring[1..]instead