Showing 10 of 10 total issues
File PathTraversalCases.cs
has 886 lines of code (exceeds 250 allowed). Consider refactoring. Open
namespace PEngine.Web.Test.Cases; public static class PathTraversalCases{ public static readonly string[] Cases = new []
Similar blocks of code found in 2 locations. Consider refactoring. Open
using System;using System.ComponentModel.DataAnnotations;using System.ComponentModel.DataAnnotations.Schema; namespace PEngine.Web.Models.Entities
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
using System;using System.ComponentModel.DataAnnotations;using System.ComponentModel.DataAnnotations.Schema; namespace PEngine.Web.Models.Entities
- Read upRead up
Method Modify
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
[HttpPost] [Authorize] [ValidateAntiForgeryToken] public async Task<IActionResult> Modify(Post formData, [FromServices] IHtmlSanitizer sanitizer)
Similar blocks of code found in 2 locations. Consider refactoring. Open
using System;using System.ComponentModel.DataAnnotations;using System.ComponentModel.DataAnnotations.Schema; namespace PEngine.Web.Models.Entities
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
using System;using System.ComponentModel.DataAnnotations;using System.ComponentModel.DataAnnotations.Schema; namespace PEngine.Web.Models.Entities
- Read upRead up
Method Rss
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
[HttpGet("/Rss")] [ResponseCache(Duration = 600)] public async Task<IActionResult> Rss() { var posts = _context.Posts.OrderByDescending(p => p.WrittenAt)
Method Upload
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
[HttpPost] [Authorize] public async Task<IActionResult> Upload(List<IFormFile> files) { var succeeded = new List<UploadResultVM>();
Method Delete
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
[HttpPost] [Authorize] [ValidateAntiForgeryToken] public async Task<IActionResult> Delete(int id, string message) {
Method Login
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
[HttpPost] [ValidateAntiForgeryToken] public IActionResult Login(string username, string password, string? ipsec) { var user = _context.Users.FirstOrDefault(u => u.Username == username);