Skip to content

NULL pointer dereference when deleting a user #15587

Closed
@a1batross

Description

@a1batross
  • Gitea version (or commit ref): 1.14.1 from GitHub Releases
  • Git version: 2.25.1
  • Operating system: Ubuntu 20.04.2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x150485f]

goroutine 1 [running]:
code.gitea.io/gitea/models.deleteUser(0x40bf3c0, 0xc0023f3ad0, 0xc00035e280, 0x3, 0xc00193def0)
        /source/models/user.go:1263 +0x255f
code.gitea.io/gitea/models.DeleteUser(0xc00035e280, 0x0, 0x0)
        /source/models/user.go:1287 +0xcf
code.gitea.io/gitea/cmd.runDeleteUser(0xc0003e4580, 0x7ffc3a2287b3, 0xc0003e4160)
        /source/cmd/admin.go:512 +0x1ba
github.com/urfave/cli.HandleAction(0x2654160, 0x38bd758, 0xc0003e4580, 0xc0003e4580, 0x0)
        /source/vendor/github.com/urfave/cli/app.go:524 +0x105
github.com/urfave/cli.Command.Run(0x2a823e0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2c58177, 0x29, 0x0, ...)
        /source/vendor/github.com/urfave/cli/command.go:173 +0x579
github.com/urfave/cli.(*App).RunAsSubcommand(0xc0023ba380, 0xc0003e42c0, 0x0, 0x0)
        /source/vendor/github.com/urfave/cli/app.go:405 +0x914
github.com/urfave/cli.Command.startApp(0x2a683b6, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2b0e041, 0xc, 0x0, ...)
        /source/vendor/github.com/urfave/cli/command.go:372 +0x7ff
github.com/urfave/cli.Command.Run(0x2a683b6, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2b0e041, 0xc, 0x0, ...)
        /source/vendor/github.com/urfave/cli/command.go:102 +0x9d4
github.com/urfave/cli.(*App).RunAsSubcommand(0xc0023ba1c0, 0xc0003e4160, 0x0, 0x0)
        /source/vendor/github.com/urfave/cli/app.go:405 +0x914
github.com/urfave/cli.Command.startApp(0x2a7141a, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2c92632, 0x42, 0x0, ...)
        /source/vendor/github.com/urfave/cli/command.go:372 +0x7ff
github.com/urfave/cli.Command.Run(0x2a7141a, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2c92632, 0x42, 0x0, ...)
        /source/vendor/github.com/urfave/cli/command.go:102 +0x9d4
github.com/urfave/cli.(*App).Run(0xc0023ba000, 0xc00003c080, 0x8, 0x8, 0x0, 0x0)
        /source/vendor/github.com/urfave/cli/app.go:277 +0x808
main.main()
        /source/main.go:115 +0xa6a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions