Do not add links to Posters or Assignees with ID < 0#20577
Conversation
Fix go-gitea#20559 Signed-off-by: Andrew Thornton <art27@cantab.net>
|
We probably need to create a subtemplate here but this is the hacky quick solution |
delvh
left a comment
There was a problem hiding this comment.
Good so far, but I can find 121 instances with ag '[^\s{]\.HomeLink', where basically nowhere the assumption can be made that the user exists. Not even if in the profile.tmpl because even if the user manages to be linked to the Ghost user profile, he still shouldn't get links like to his RSS feed.
I mean honestly it looks like we should just create the subtemplate. |
Signed-off-by: Andrew Thornton <art27@cantab.net>
delvh
left a comment
There was a problem hiding this comment.
Ah, a PR that removes lines, improves readability, and still adds additional functionality.
That is a good PR.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Codecov Report
@@ Coverage Diff @@
## main #20577 +/- ##
=======================================
Coverage ? 47.03%
=======================================
Files ? 982
Lines ? 135988
Branches ? 0
=======================================
Hits ? 63959
Misses ? 64177
Partials ? 7852 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Backport go-gitea#20577 There are several places in templates/repo/issue/view_content/comments.tmpl where links are made to Posters or Assignees who are Ghosts or have IDs <0. Fix go-gitea#20559 Signed-off-by: Andrew Thornton <art27@cantab.net>
* upstream/main: (22 commits) [skip ci] Updated translations via Crowdin Webhook for Wiki changes (go-gitea#20219) test: use `T.TempDir` to create temporary test directory (go-gitea#21043) Set uploadpack.allowFilter etc on gitea serv to enable partial clones with ssh (go-gitea#20902) Fix 500 on time tracking in timeline API (go-gitea#21052) Add more checks in migration code (go-gitea#21011) Fill the specified ref in webhook test payload (go-gitea#20961) [skip ci] Updated licenses and gitignores Add go licenses to licenses.txt (go-gitea#21034) Added docs for agit-setup (go-gitea#21027) Add another index for Action table on postgres (go-gitea#21033) Delete unreferenced packages when deleting a package version (go-gitea#20977) Improve arc-green code theme (go-gitea#21039) Add down key check has tribute container (go-gitea#21016) Do not add links to Posters or Assignees with ID < 0 (go-gitea#20577) [skip ci] Updated translations via Crowdin Show language name on hover (go-gitea#20923) fix: PackageMetadataVersion deps (go-gitea#21017) Fix the quick-submit for pending review comment (go-gitea#20992) Kd/ci playwright go test (go-gitea#20123) ...
There are several places in templates/repo/issue/view_content/comments.tmpl where links are made to Posters or Assignees who are Ghosts or have IDs <0.
Fix #20559
Signed-off-by: Andrew Thornton art27@cantab.net