index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
internal
/
form
/
repo.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
author
Joe Chen <jc@unknwon.io>
2022-05-31 15:17:17 +0800
committer
GitHub <noreply@github.com>
2022-05-31 15:17:17 +0800
commit
7885f454a4946c4bbec1b4f8c603b5eea7429c7f
(
patch
)
tree
00010af607268eef9f1adcb9d8f6d713f653ee34
/
internal/form/repo.go
parent
90bc75229726a24a28507d3e8178f86734f112e1
(
diff
)
webhook: revalidate local hostname before each delivery (#6988)
Diffstat
(limited to 'internal/form/repo.go')
-rw-r--r--
internal/form/repo.go
4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/form/repo.go b/internal/form/repo.go
index adcbc66a..5750d78e 100644
--- a/
internal/form/repo.go
+++ b/
internal/form/repo.go
@@ -72,8 +72,8 @@ func (f MigrateRepo) ParseRemoteAddr(user *db.User) (string, error) {
return "", db.ErrInvalidCloneAddr{IsURLError: true}
}
- if netutil.IsLocalHostname(u.Hostname(), conf.Security.LocalNetworkAllowlist) {
- return "", db.ErrInvalidCloneAddr{IsURLError: true}
+ if netutil.IsBlockedLocalHostname(u.Hostname(), conf.Security.LocalNetworkAllowlist) {
+ return "", db.ErrInvalidCloneAddr{IsBlockedLocalAddress: true}
}
if len(f.AuthUsername)+len(f.AuthPassword) > 0 {