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/models
zeripath 44371b96f5 Ensure valid git author names passed in signatures (#5774)
* Ensure valid git author names passed in signatures

Fix #5772 - Git author names are not allowed to include `\n` `<` or `>` and
must not be empty. Ensure that the name passed in a signature is valid.

* Account for pathologically named external users

LDAP and the like usernames are not checked in the same way that users who signup are.
Therefore just ensure that user names are also git safe and if totally pathological -
Set them to "user-$UID"

* Add Tests and adjust test users

Make our testcases a little more pathological so that we be sure that integration
tests have a chance to spot these cases.

Signed-off-by: Andrew Thornton <art27@cantab.net>
6 years ago
..
fixtures Ensure valid git author names passed in signatures (#5774) 6 years ago
migrations fix migration 78 error mssql (#5791) 6 years ago
access.go Restrict permission check on repositories and fix some problems (#5314) 6 years ago
access_test.go Restrict permission check on repositories and fix some problems (#5314) 6 years ago
action.go Refactor repo.isBare to repo.isEmpty #5629 (#5714) 6 years ago
action_list.go refactor: reduce sql query in retrieveFeeds (#3547) 7 years ago
action_test.go Don't close issues via commits on non-default branch. (#5622) 6 years ago
admin.go Refactor struct's time to remove unnecessary memory usage (#3142) 7 years ago
admin_test.go Fix tests code to prevent some runtime errors (#2381) 8 years ago
attachment.go Added URL mapping for Release attachments like on github.com (#1707) 6 years ago
attachment_test.go Add Attachment API (#3478) 7 years ago
branches.go fix approvals limitation (#5521) 6 years ago
branches_test.go Add deleted_branch table fixture (#2832) 7 years ago
consistency.go Fix activity feed (#1779) 8 years ago
error.go Pull request review/approval and comment on code (#3748) 7 years ago
error_oauth2.go gofmt (#1662) 8 years ago
external_login_user.go Add primary key and index to external login user table (#1656) 8 years ago
git_diff.go Fix regex to support optional end line of old section in diff hunk (#5096) 6 years ago
git_diff_test.go Pull request review/approval and comment on code (#3748) 7 years ago
gpg_key.go Fix null pointer dereference in ParseCommitWithSignature (#4962) 6 years ago
gpg_key_test.go Refactor struct's time to remove unnecessary memory usage (#3142) 7 years ago
graph.go Make max commits in graph configurable (#4498) 7 years ago
graph_test.go Accept 'Data:' in commit graph (#4487) 7 years ago
helper.go Add reactions to issues/PR and comments (#2856) 7 years ago
issue.go Add the ability to use multiple labels as filters(#5786) 6 years ago
issue_assignees.go Fix sqlite deadlock when assigning to a PR (#5640) 6 years ago
issue_assignees_test.go Improve performance of dashboard (#4977) 6 years ago
issue_comment.go Refactor notification for indexer (#5111) 6 years ago
issue_comment_list.go Improve performance of dashboard (#4977) 6 years ago
issue_comment_test.go Pull request review/approval and comment on code (#3748) 7 years ago
issue_dependency.go fix sqlite lock (#5184) 6 years ago
issue_dependency_test.go Improve performance of dashboard (#4977) 6 years ago
issue_indexer.go Refactor notification for indexer (#5111) 6 years ago
issue_label.go Add the ability to use multiple labels as filters(#5786) 6 years ago
issue_label_test.go Fix tests code to prevent some runtime errors (#2381) 8 years ago
issue_list.go fix bugs when too many IN variables (#4594) 7 years ago
issue_list_test.go Shows total tracked time in issue and milestone list (#3341) 7 years ago
issue_mail.go Fix sqlite deadlock when assigning to a PR (#5640) 6 years ago
issue_milestone.go Milestone issues and pull requests (#5293) 6 years ago
issue_milestone_test.go Add more webhooks support and refactor webhook templates directory (#3929) 7 years ago
issue_reaction.go Refactor struct's time to remove unnecessary memory usage (#3142) 7 years ago
issue_reaction_test.go Ensure valid git author names passed in signatures (#5774) 6 years ago
issue_stopwatch.go Improve performance of dashboard (#4977) 6 years ago
issue_stopwatch_test.go Refactor struct's time to remove unnecessary memory usage (#3142) 7 years ago
issue_test.go Add the ability to use multiple labels as filters(#5786) 6 years ago
issue_tracked_time.go Improve performance of dashboard (#4977) 6 years ago
issue_tracked_time_test.go Feature: Timetracking (#2211) 7 years ago
issue_user.go Fix sqlite deadlock when assigning to a PR (#5640) 6 years ago
issue_user_test.go Multiple assignees (#3705) 7 years ago
issue_watch.go Update xorm to latest version and fix correct `user` table referencing in sql (#4473) 7 years ago
issue_watch_test.go Hide unactive on explore users and some refactors (#2741) 7 years ago
lfs.go Pooled and buffered gzip implementation (#5722) 6 years ago
lfs_lock.go Restrict permission check on repositories and fix some problems (#5314) 6 years ago
login_source.go Synchronize SSH keys on login with LDAP + Fix SQLite deadlock on ldap ssh key deletion (#5557) 6 years ago
mail.go Improve performance of dashboard (#4977) 6 years ago
main_test.go Unit tests for wiki routers (#3022) 7 years ago
models.go Added test environment for mssql (#4282) 6 years ago
models_sqlite.go go vet 11 years ago
models_test.go Change parsing of postgresql settings (#4275) 7 years ago
notification.go Fix sqlite lock (#5176) 6 years ago
notification_test.go Add 'mark all read' option to notifications (#3097) 7 years ago
oauth2.go Discord Oauth2 support (#4476) 6 years ago
org.go api: Add missing GET teams endpoints (#5382) 6 years ago
org_team.go api: Add missing GET teams endpoints (#5382) 6 years ago
org_team_test.go api: Add missing GET teams endpoints (#5382) 6 years ago
org_test.go Restrict permission check on repositories and fix some problems (#5314) 6 years ago
pull.go Make sure .git/info is created before generating .git/info/sparse-che… (#5825) 6 years ago
pull_test.go Disable merging a WIP Pull request (#4529) 7 years ago
release.go Added URL mapping for Release attachments like on github.com (#1707) 6 years ago
release_test.go mirror: Delete tags in mirror which are removed for original repo. (#5609) 6 years ago
repo.go When creating new repository fsck option should be enabled (#5817) 6 years ago
repo_activity.go Add issue closed time column to fix activity closed issues list (#3537) 7 years ago
repo_branch.go Create new branch from branch selection dropdown (#2130) 7 years ago
repo_collaboration.go Fix not removed watches on unallowed repositories (#4201) 7 years ago
repo_collaboration_test.go Unit tests for models/repo_collaboration (#1032) 8 years ago
repo_editor.go Code/repo search (#2582) 7 years ago
repo_indexer.go Update code.gitea.io/git (#3482) 7 years ago
repo_issue.go Add EnableTimetracking option to app settings (#3719) 7 years ago
repo_list.go This commit will reduce join star, repo_topic, topic tables on repo search, so that fix extra columns problem on mssql (#5136) 6 years ago
repo_list_test.go This commit will reduce join star, repo_topic, topic tables on repo search, so that fix extra columns problem on mssql (#5136) 6 years ago
repo_mirror.go Add option to disable automatic mirror syncing. (#5242) 6 years ago
repo_permission.go Restrict permission check on repositories and fix some problems (#5314) 6 years ago
repo_permission_test.go Restrict permission check on repositories and fix some problems (#5314) 6 years ago
repo_redirect.go Redirects for renamed repos (#807) 8 years ago
repo_redirect_test.go Unit tests for repo redirects (#961) 8 years ago
repo_test.go Fix repo-transfer-and-team-repo-count bug (#3241) 7 years ago
repo_unit.go Add rebase with merge commit merge style (#3844) (#4052) 6 years ago
repo_watch.go Fix sqlite deadlock when assigning to a PR (#5640) 6 years ago
repo_watch_test.go Hide unactive on explore users and some refactors (#2741) 7 years ago
review.go Webhook for Pull Request approval/rejection (#5027) 6 years ago
review_test.go Show review summary in pull requests (#5132) 6 years ago
ssh_key.go fix public will not be reused as public key after deleting as deploy key (#5671) 6 years ago
ssh_key_test.go Use assert in legacy unit tests (#867) 8 years ago
star.go Ensure that sessions are passed into queries that could use the database to prevent deadlocks (#5718) 6 years ago
star_test.go Fix tests code to prevent some runtime errors (#2381) 8 years ago
status.go Fix race on updatesize (#5190) 6 years ago
status_test.go Fix tests code to prevent some runtime errors (#2381) 8 years ago
test_fixtures.go Increase the retry limit to 20 times and the interval to 200ms (#5134) 6 years ago
token.go Refactor struct's time to remove unnecessary memory usage (#3142) 7 years ago
token_test.go Fix tests code to prevent some runtime errors (#2381) 8 years ago
topic.go fix topic name length on database (#5493) 6 years ago
topic_test.go feat(repo): support search repository by topic name (#4505) 6 years ago
twofactor.go Switch plaintext scratch tokens to use hash instead (#4331) 7 years ago
u2f.go Add support for FIDO U2F (#3971) 7 years ago
u2f_test.go Add support for FIDO U2F (#3971) 7 years ago
unit.go Fix create team, update team missing units (#5188) 6 years ago
unit_tests.go User action heatmap (#5131) 6 years ago
update.go Improve performance of dashboard (#4977) 6 years ago
update_test.go Fix tests code to prevent some runtime errors (#2381) 8 years ago
user.go Ensure valid git author names passed in signatures (#5774) 6 years ago
user_follow.go Refactor session close as xorm already does everything needed internally (#2020) 8 years ago
user_follow_test.go Move user_follow to separate file (#1210) 8 years ago
user_heatmap.go Only count users own actions for heatmap contributions (#5647) 6 years ago
user_heatmap_test.go Fix JSON result of empty array (#5154) 6 years ago
user_mail.go Replace deprecated Id method with ID (#2655) 7 years ago
user_mail_test.go Fix tests code to prevent some runtime errors (#2381) 8 years ago
user_openid.go Fix SQL quoting (#5117) 6 years ago
user_openid_test.go Fix tests code to prevent some runtime errors (#2381) 8 years ago
user_test.go Ensure valid git author names passed in signatures (#5774) 6 years ago
webhook.go Webhook for Pull Request approval/rejection (#5027) 6 years ago
webhook_dingtalk.go Webhook for Pull Request approval/rejection (#5027) 6 years ago
webhook_discord.go Webhook for Pull Request approval/rejection (#5027) 6 years ago
webhook_slack.go Webhook for Pull Request approval/rejection (#5027) 6 years ago
webhook_test.go Add more webhooks support and refactor webhook templates directory (#3929) 7 years ago
wiki.go Fix deadlock when sqlite (#5118) 6 years ago
wiki_test.go test: reduce testing time. (#3885) 7 years ago