Skip to content

Commit

Permalink
Privileged can bypass blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed Sep 10, 2024
1 parent ebd40fc commit fe16983
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ func (c *CRProxy) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
Name: info.Image,
}

if c.blockFunc != nil && c.blockFunc(imageInfo) {
if c.blockFunc != nil && !c.isPrivileged(r, nil) && c.blockFunc(imageInfo) {
if c.blockMessage != "" {
errcode.ServeJSON(rw, errcode.ErrorCodeDenied.WithMessage(c.blockMessage))
} else {
Expand Down

0 comments on commit fe16983

Please sign in to comment.