0x00000FF/PEngine

View on GitHub

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 []
Severity: Major
Found in Sources/PEngine.Web.Test/Cases/PathTraversalCases.cs - About 2 days to fix

    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
    Severity: Major
    Found in Sources/PEngine.Web/Models/Entities/GuestbookComment.cs and 1 other location - About 2 hrs to fix
    Sources/PEngine.Web/Models/Entities/Comment.cs on lines 1..39

    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
    Severity: Major
    Found in Sources/PEngine.Web/Models/Entities/Comment.cs and 1 other location - About 2 hrs to fix
    Sources/PEngine.Web/Models/Entities/GuestbookComment.cs on lines 1..39

    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)
    Severity: Major
    Found in Sources/PEngine.Web/Controllers/PostController.cs - About 2 hrs to fix

      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
      Severity: Major
      Found in Sources/PEngine.Web/Models/Entities/PostHit.cs and 1 other location - About 1 hr to fix
      Sources/PEngine.Web/Models/Entities/PostLike.cs on lines 1..26

      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
      Severity: Major
      Found in Sources/PEngine.Web/Models/Entities/PostLike.cs and 1 other location - About 1 hr to fix
      Sources/PEngine.Web/Models/Entities/PostHit.cs on lines 1..26

      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)
      Severity: Minor
      Found in Sources/PEngine.Web/Controllers/HomeController.cs - About 1 hr to fix

        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>();
        Severity: Minor
        Found in Sources/PEngine.Web/Controllers/FileController.cs - About 1 hr to fix

          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)
          {
          Severity: Minor
          Found in Sources/PEngine.Web/Controllers/PostController.cs - About 1 hr to fix

            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);
            Severity: Minor
            Found in Sources/PEngine.Web/Controllers/MemberController.cs - About 1 hr to fix
              Severity
              Category
              Status
              Source
              Language