1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-09-05 23:34:19 -04:00
gitea/modules
zeripath f104898989 Allow to merge if file path contains " or \ (#8629) (#8772)
* 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:49 -04:00
..
auth Abort syncrhonization from LDAP source if there is some error. (#7965) 2019-08-25 02:59:21 +02:00
avatar
base
cache
context Use AppSubUrl for more redirections (#8647) (#8652) 2019-10-23 18:26:54 -04:00
cron
generate
git IsBranchExist: return false if provided name is empty (#8485) (#8492) 2019-10-13 20:23:43 +03:00
gzip
highlight
httplib
indexer
lfs Ensure Request Body Readers are closed in LFS server (#8454) (#8459) 2019-10-11 17:11:06 +01:00
log Fix data race (#8206) 2019-09-17 12:40:28 +03:00
mailer
markup feat: highlight issue references with : (#8101) (#8404) 2019-10-06 23:41:46 -04:00
metrics
migrations fix bug when migrating a private repository (#7917) (#8403) 2019-10-07 00:58:35 -04:00
minwinsvc
notification
options
pprof
private
process Restore functionality for early gits (#7775) (#8476) 2019-10-13 12:40:13 +08:00
public
pull Allow to merge if file path contains " or \ (#8629) (#8772) 2019-11-01 13:50:49 -04:00
recaptcha
repofiles Fix #8582 by handling empty repos (#8587) (#8593) 2019-10-19 22:07:12 +03:00
search
secret
session
setting
ssh
structs
sync
templates
test
user
util
validation