Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description with Pure Numbers Cause Internal Server Error #5351

Closed
rrushtw opened this issue Jan 17, 2024 · 2 comments
Closed

Description with Pure Numbers Cause Internal Server Error #5351

rrushtw opened this issue Jan 17, 2024 · 2 comments
Assignees
Labels
status: confirmed We have confirmed that the issue exists type: bug Something isn't working
Milestone

Comments

@rrushtw
Copy link

rrushtw commented Jan 17, 2024

Description

Bug Description

Giving a pure number string such as "123456" in description causes 500 Internal Server Error

Screen Shot 2024-01-17 154752

View the same document in the other tab
Screen Shot 2024-01-17 154928

If the document is closed with description: [pure numbers],
there is no way to open the document.

Environment

  • hedgedoc version: 1.9.9 2023-07-30
  • service OS: Ubuntu 22.04.3 LTS

Steps to reproduce

Steps

  1. Add a new document
  2. Add title, tags, and description with pure numbers
---
title: untitled
tags:
description: 123456
---
  1. Open the same document in a new tab
  2. There is Internal Service Error on the page.

Expected behaviour

Steps

  1. Add a new document
  2. Add title, tags, and description with pure numbers
---
title: untitled
tags:
description: 123456
---
  1. Open the same document in a new tab
  2. The document should be displayed as usual.

Logs

No response

Config

No response

Your Setup

  • Host OS: Ubuntu 22.04.3 LTS
  • NodeJS version: v20.7.0
  • HedgeDoc version: 1.9.9

Additional context

No response

@rrushtw rrushtw added the type: bug Something isn't working label Jan 17, 2024
@ErikMichelson
Copy link
Member

I can reproduce this bug. It is caused by an unproper EJS template usage. A fix is on the way.

The good news: In HedgeDoc 2.0 this will be fixed already, altogether with a user warning.

image

@ErikMichelson ErikMichelson self-assigned this Jan 17, 2024
@ErikMichelson ErikMichelson added this to the Version 1.x milestone Jan 17, 2024
@ErikMichelson ErikMichelson added the status: confirmed We have confirmed that the issue exists label Jan 17, 2024
@ErikMichelson
Copy link
Member

Fixed in 538f41c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: confirmed We have confirmed that the issue exists type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants