mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-09 08:23:30 +00:00
Fix secret image filter regex (#2674)
This commit is contained in:
@@ -112,10 +112,14 @@ func (s *Secret) Match(event WebhookEvent) bool {
|
||||
}
|
||||
|
||||
var validDockerImageString = regexp.MustCompile(
|
||||
`^([\w\d\-_\.\/]*` + // optional url prefix
|
||||
`[\w\d\-_]+` + // image name
|
||||
`)+` +
|
||||
`(:[\w\d\-_]+)?$`, // optional image tag
|
||||
`^(` +
|
||||
`[\w\d\-_\.]+` + // hostname
|
||||
`(:\d+)?` + // optional port
|
||||
`/)?` + // optional hostname + port
|
||||
`([\w\d\-_\.][\w\d\-_\.\/]*/)?` + // optional url prefix
|
||||
`([\w\d\-_]+)` + // image name
|
||||
`(:[\w\d\-_]+)?` + // optional image tag
|
||||
`$`,
|
||||
)
|
||||
|
||||
// Validate validates the required fields and formats.
|
||||
|
Reference in New Issue
Block a user