Load markdown from logical link if inside repo #731

Closed
opened 2025-11-02 03:34:22 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @gsantner on GitHub (May 22, 2017).

  • Gitea version:1.1.0+dev
  • Git version: 2.13.0
  • Operating system: Debian
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes
    • No
    • Not relevant
  • Log gist:

Description

In an example repo I added the docs to e.g. docs/index.md and made an logical link to it:

cd repo
ln -s docs/index.md README.md

The markdown renderer now just shows the path of the logical link, instead of displaying it's contents as seen in screenshots. It should display the contents instead. It is important to check if the path is inside the repo (otherwise it would be a security risk).

Screenshots

unbenannt

Originally created by @gsantner on GitHub (May 22, 2017). - Gitea version:1.1.0+dev - Git version: 2.13.0 - Operating system: Debian - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes - [ ] No - [ ] Not relevant - Log gist: ## Description In an example repo I added the docs to e.g. `docs/index.md` and made an logical link to it: cd repo ln -s docs/index.md README.md The markdown renderer now just shows the path of the logical link, instead of displaying it's contents as seen in screenshots. It should display the contents instead. It is important to check if the path is inside the repo (otherwise it would be a security risk). ## Screenshots ![unbenannt](https://cloud.githubusercontent.com/assets/6735650/26310260/7d9d1b7e-3f00-11e7-908c-21ed42674a22.png)
GiteaMirror added the issue/stale label 2025-11-02 03:34:22 -06:00
Author
Owner

@sondr3 commented on GitHub (May 22, 2017):

But why? This is pretty much something that no other code hosting services does nor is it something that I think makes sense, the README is different from the documentation, it's an introduction to your project/repository.

@sondr3 commented on GitHub (May 22, 2017): But why? This is pretty much something that no other code hosting services does nor is it something that I think makes sense, the README is different from the documentation, it's an introduction to your project/repository.
Author
Owner

@gsantner commented on GitHub (May 22, 2017):

This is pretty much something that no other code hosting services does

Is having features that others don't have bad? Don't think so

nor is it something that I think makes sense, the README is different from the documentation, it's an introduction to your project/repository.

README was just an example. This is about the possibilty of rendering any markdown that is symlinked in the repo.

@gsantner commented on GitHub (May 22, 2017): > This is pretty much something that no other code hosting services does Is having features that others don't have bad? Don't think so > nor is it something that I think makes sense, the README is different from the documentation, it's an introduction to your project/repository. README was just an example. This is about the possibilty of rendering any markdown that is symlinked in the repo.
Author
Owner

@stale[bot] commented on GitHub (Feb 14, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 14, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Feb 28, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Feb 28, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#731