Skip to content

README.md in npm package cause gitea to crash #23082

Closed
@nmqh

Description

@nmqh

Description

After the attached file README.md is included in a npm package and published to GITea, and then when package details page is opened in GITea site for this package, GITea crashes (see attached error message) AppErrorAndCrash

In the README.md if the following line is removed and published, the gitea app/service does not fail when viewing the package details in GITea.
- The pacakge name @qccat-ui has been renamed to @qccat/core-ui.

Gitea Version

1.18.5

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

GITea is running in windows.

Database

None

Activity

Zettat123

Zettat123 commented on Feb 23, 2023

@Zettat123
Contributor

I think the reason of the panic is the ctx.Ctx is nil

if processorHelper.IsUsernameMentionable != nil && processorHelper.IsUsernameMentionable(ctx.Ctx, mentionedUsername) {

ctx.Ctx should be set when create markup.RenderContext

"RenderMarkdownToHtml": func(input string) template.HTML {
output, err := markdown.RenderString(&markup.RenderContext{
URLPrefix: setting.AppSubURL,
}, input)

self-assigned this
on Feb 23, 2023
added this to the 1.19.0 milestone on Feb 23, 2023
added a commit that references this issue on Feb 24, 2023
a6175b0
added a commit that references this issue on Feb 24, 2023
b3203dc
added a commit that references this issue on Feb 24, 2023
e02e752
locked and limited conversation to collaborators on May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @lunny@techknowlogick@Zettat123@nmqh

    Issue actions

      README.md in npm package cause gitea to crash · Issue #23082 · go-gitea/gitea