forgejo/routers/api/v1/repo
Kemal Zebari 9cd0441cd3
Catch and handle unallowed file type errors in issue attachment API (#30791)
Before, we would just throw 500 if a user passes an attachment that is
not an allowed type. This commit catches this error and throws a 422
instead since this should be considered a validation error.

(cherry picked from commit 872caa17c0a30d95f85ab75c068d606e07bd10b3)

Conflicts:
	tests/integration/api_comment_attachment_test.go
	tests/integration/api_issue_attachment_test.go
	trivial context conflict because of 'allow setting the update date on issues and comments'
2024-05-05 12:15:40 +01:00
..
action.go feat(api): enhance Actions Secrets Management API for repository (#30656) 2024-04-28 15:39:01 +02:00
actions.go Add API endpoints for getting action jobs status (#26673) 2024-05-05 12:15:40 +01:00
avatar.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
blob.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
branch.go Fix branch_protection api shows users/teams who has no readAccess (#30291) 2024-04-21 16:28:16 +02:00
collaborators.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
commits.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
compare.go Fix compare api swagger (#30648) 2024-04-28 15:39:00 +02:00
file.go Count downloads for tag archives 2024-04-08 12:51:27 +02:00
flags.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
fork.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
git_hook.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
git_ref.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
hook.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
hook_test.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue.go Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
issue_attachment.go Catch and handle unallowed file type errors in issue attachment API (#30791) 2024-05-05 12:15:40 +01:00
issue_comment.go Do some performance optimize for issues list and view issue/pull (gitea#29515) 2024-04-08 14:47:31 +02:00
issue_comment_attachment.go Catch and handle unallowed file type errors in issue attachment API (#30791) 2024-05-05 12:15:40 +01:00
issue_dependency.go Fix missed doer (#30231) 2024-04-15 20:01:35 +02:00
issue_label.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_pin.go Fix missed doer (#30231) 2024-04-15 20:01:35 +02:00
issue_reaction.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_stopwatch.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_subscription.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
issue_tracked_time.go Fix missed doer (#30231) 2024-04-15 20:01:35 +02:00
key.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
label.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
language.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
migrate.go Resolve lint for unused parameter and unnecessary type arguments (#30750) 2024-05-05 08:38:16 +01:00
milestone.go remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
mirror.go Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
notes.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
patch.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
pull.go Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
pull_review.go Prevent allow/reject reviews on merged/closed PRs (#30686) 2024-04-28 15:39:01 +02:00
release.go [FEAT]Add Option to hide Release Archive links (#3139) 2024-04-24 15:15:55 +00:00
release_attachment.go Add support for API blob upload of release attachments (#29507) 2024-03-06 12:10:46 +08:00
release_tags.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
repo.go Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
repo_test.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
star.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
status.go Cache repository default branch commit status to reduce query on commit status table (#29444) 2024-03-11 23:36:58 +07:00
subscriber.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
tag.go Count downloads for tag archives 2024-04-08 12:51:27 +02:00
teams.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
topic.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
transfer.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
tree.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
wiki.go Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00