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.
gitea/routers/repo
zeripath 320031fce6
Handle more pathological branch and tag names (#11843) (#11863)
Backport #11843

It's possible to push quite pathological appearing branch names to gitea
using git push gitea reasonable-branch:refs/heads/-- at which point
large parts of the UI will break. Similarly you can git push origin
reasonable-tag:refs/tags/-- which wil return an error.

This PR fixes the problems these cause. It also changes the code from
creating branches to pushing to ensure that branch restoration has to
pass hooks.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
5 years ago
..
activity.go Add top author stats to activity page (#9615) 5 years ago
attachment.go Move dropzone.js to npm/webpack (#10645) 5 years ago
blame.go Load Repo Topics on blame view (#11307) 5 years ago
branch.go Handle more pathological branch and tag names (#11843) (#11863) 5 years ago
commit.go Support view individual commit for wiki pages (#11415) 5 years ago
compare.go Handle more pathological branch and tag names (#11843) (#11863) 5 years ago
download.go Fix download file wrong content-type (#9825) 5 years ago
editor.go Switch code editor to Monaco (#11366) 5 years ago
editor_test.go Add Close() method to gogitRepository (#8901) 5 years ago
http.go Fix missing authorization check on pull for public repos of private/limited org (#11656) (#11682) 5 years ago
issue.go Fix ref links in issue overviews for tags (#8742) 5 years ago
issue_dependency.go Fix wrong permissions check when issues/prs shared operations (#9885) 5 years ago
issue_label.go Add Organization Wide Labels (#10814) 5 years ago
issue_label_test.go fix go vet error (#3740) 7 years ago
issue_lock.go Implement "conversation lock" for issue comments (#5073) 6 years ago
issue_stopwatch.go Automatically clear stopwatch on merging a PR (#4327) 6 years ago
issue_timetrack.go [API] Extend times API (#9200) 5 years ago
issue_watch.go Fix PR/issue redirects when having external tracker (#9339) 5 years ago
lfs.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
main_test.go Unit tests for wiki routers (#3022) 7 years ago
middlewares.go Add gitea-vet (#10948) 5 years ago
milestone.go Refactor Milestone related (#11225) 5 years ago
pull.go Handle more pathological branch and tag names (#11843) (#11863) 5 years ago
pull_review.go Add a way to mark Conversation (code comment) resolved (#11037) 5 years ago
release.go Honor DEFAULT_PAGING_NUM for API (#11805) (#11813) 5 years ago
release_test.go Add Close() method to gogitRepository (#8901) 5 years ago
repo.go Fix orgs not being displayed on create repo form (#11279) 5 years ago
search.go Add detected file language to code search (#10256) 5 years ago
setting.go Fix doer of rename repo (#11789) (#11794) 5 years ago
setting_protected_branch.go Prevent merge of outdated PRs on protected branches (#11012) 5 years ago
settings_test.go Stop various tests from adding to the source tree (#9515) 5 years ago
topic.go Add API endpoint for accessing repo topics (#7963) 6 years ago
view.go Allow different HardBreaks settings for documents and comments (#11515) (#11599) 5 years ago
webhook.go Fix webhook template when validation errors occur (#11421) 5 years ago
wiki.go Allow different HardBreaks settings for documents and comments (#11515) (#11599) 5 years ago
wiki_test.go Fix wiki raw view on sub path (#10002) 5 years ago