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

Special README paths can be infinitely nested #23694

Closed
kousu opened this issue Mar 25, 2023 · 1 comment · Fixed by #23695
Closed

Special README paths can be infinitely nested #23694

kousu opened this issue Mar 25, 2023 · 1 comment · Fixed by #23695
Labels

Comments

@kousu
Copy link
Contributor

kousu commented Mar 25, 2023

Description

Gitea supports loading READMEs from ./README.md but also ./README, ./README.txt, ./README.zh.md, etc, and also also ./docs/README.md, ./.github/README.md, ./.gitea/README.md.

But currently it also supports infinitely nested copies of these special subdirs, like this regex: ./({docs,.github,.gitea}/)+README.*

Eg. https://try.gitea.io/kousu/test-readme-recurse/

Gitea Version

1.20.0+dev-265-gc5cfc0855

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Screenshot 2023-03-24 at 21-01-53 test-readme-recurse

Git Version

2.24.1

Operating System

Ubuntu 22.04

How are you running Gitea?

I built mine at home.

Database

SQLite

@kousu kousu added the type/bug label Mar 25, 2023
@kousu
Copy link
Contributor Author

kousu commented Mar 25, 2023

This was introduced when I was responding to code review during #22177.

There is a test I added in #23185 for this, but I left commented out because I knew this was broken.

kousu added a commit to neuropoly/gitea that referenced this issue Mar 25, 2023
Fixes a bug introduced in go-gitea#22177
which allows finding READMEs like docs/docs/docs/.gitea/.github/docs/README.md

Fixes go-gitea#23694
jolheiser pushed a commit that referenced this issue Apr 11, 2023
…s. (#23695)

Fixes a bug introduced in #22177
which allows finding READMEs like
docs/docs/docs/.gitea/.github/docs/README.md

Fixes #23694
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant