1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-30 23:25:48 +00:00
gitea/services
zeripath 4dac8b2389 Allow to merge if file path contains " or \ (#8629) (#8771)
* if a filename in a repository contains " or \ the owner can't merge pull request with this files
because "git diff-tree" adds double quotes to that filepath
example: filepath is ab"cd but "git diff-tree" returns "ab\"cd"

now, when the owner click "Merge Pull Request" button the server returns 500
this commit fix it

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* add -z option to getDiffTree
escape spec symbols for sparse-checkout

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* go fmt

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* typo

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* escape '\'
escape all spaces and '!'

* use regexp.ReplaceAllString()

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* strings.ReplaceAll was added in go 1.12

Signed-off-by: Ilya Pavlov <ilux@cpan.org>

* add '\' to regexp.MustCompile

Signed-off-by: Ilya Pavlov <ilux@cpan.org>
2019-11-01 13:50:59 -04:00
..
comments Move create issue comment to comments package (#8212) 2019-09-24 13:39:50 -04:00
externalaccount Allow externalID to be UUID (#8551) (#8624) 2019-10-22 09:12:10 +01:00
gitdiff Move git diff codes from models to services/gitdiff (#7889) 2019-09-05 22:20:09 -04:00
issue Move change issue title from models to issue service package (#8456) 2019-10-11 14:44:43 +08:00
mailer Rewrite reference processing code in preparation for opening/closing from comment references (#8261) 2019-10-13 23:29:10 +01:00
milestone move some milestone functions to a standalone package (#8213) 2019-09-18 08:17:12 +08:00
mirror Move migrating repository from frontend to backend (#6200) 2019-10-13 21:23:14 +08:00
pull Allow to merge if file path contains " or \ (#8629) (#8771) 2019-11-01 13:50:59 -04:00
release Move mirror to a standalone package from models (#7486) 2019-10-01 21:40:17 +08:00