mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
* Check commit message hashes before making links
Previously, when formatting commit messages, anything
that looked like SHA1 hashes was turned into a link
using regex. This meant that certain phrases or numbers
such as `777777` or `deadbeef` could be recognized as a commit
even if the repository has no commit with those hashes.
This change will make it so that anything that looks
like a SHA1 hash using regex will then also be checked
to ensure that there is a commit in the repository
with that hash before making a link.
Signed-off-by: Gary Kim <gary@garykim.dev>
* Use gogit to check if commit exists
This commit modifies the commit hash check
in the render for commit messages to use
gogit for better performance.
Signed-off-by: Gary Kim <gary@garykim.dev>
* Make code cleaner
Signed-off-by: Gary Kim <gary@garykim.dev>
* Use rev-parse to check if commit exists
Signed-off-by: Gary Kim <gary@garykim.dev>
* Add and modify tests for checking hashes in html link rendering
Signed-off-by: Gary Kim <gary@garykim.dev>
* Return error in sha1CurrentPatternProcessor
Co-Authored-By: mrsdizzie <info@mrsdizzie.com>
* Import Gitea log module
Signed-off-by: Gary Kim <gary@garykim.dev>
* Revert "Return error in sha1CurrentPatternProcessor"
This reverts commit
|
6 years ago | |
---|---|---|
.. | ||
auth | 6 years ago | |
avatar | 6 years ago | |
base | 6 years ago | |
cache | 6 years ago | |
context | 6 years ago | |
cron | 6 years ago | |
generate | 6 years ago | |
git | 6 years ago | |
gzip | 6 years ago | |
highlight | 6 years ago | |
httplib | 6 years ago | |
indexer | 6 years ago | |
lfs | 6 years ago | |
log | 6 years ago | |
mailer | 6 years ago | |
markup | 6 years ago | |
metrics | 6 years ago | |
migrations | 6 years ago | |
minwinsvc | 8 years ago | |
notification | 6 years ago | |
options | 6 years ago | |
pprof | 6 years ago | |
private | 6 years ago | |
process | 7 years ago | |
public | 6 years ago | |
pull | 6 years ago | |
recaptcha | 6 years ago | |
repofiles | 6 years ago | |
search | 7 years ago | |
secret | 6 years ago | |
session | 6 years ago | |
setting | 6 years ago | |
ssh | 6 years ago | |
structs | 6 years ago | |
sync | 8 years ago | |
templates | 6 years ago | |
test | 6 years ago | |
upload | 6 years ago | |
user | 6 years ago | |
util | 6 years ago | |
validation | 6 years ago |