| Index: cipd/client/cipd/local/builder.go
|
| diff --git a/cipd/client/cipd/local/builder.go b/cipd/client/cipd/local/builder.go
|
| index ec0b3f0df53c61818aaa97559c05f42360286336..cbfb2c2224a93a9ec8b287e47359829a3d51be5f 100644
|
| --- a/cipd/client/cipd/local/builder.go
|
| +++ b/cipd/client/cipd/local/builder.go
|
| @@ -55,11 +55,16 @@ func BuildInstance(ctx context.Context, opts BuildInstanceOptions) error {
|
| return err
|
| }
|
|
|
| - // Make sure no files are written to package service directory.
|
| + // Sanitize the Inputs.
|
| for _, f := range opts.Input {
|
| + // Make sure no files are written to package service directory.
|
| if strings.HasPrefix(f.Name(), packageServiceDir+"/") {
|
| return fmt.Errorf("can't write to %s: %s", packageServiceDir, f.Name())
|
| }
|
| + // Make sure no files are written to cipd's internal state directory.
|
| + if strings.HasPrefix(f.Name(), SiteServiceDir+"/") {
|
| + return fmt.Errorf("can't write to %s: %s", SiteServiceDir, f.Name())
|
| + }
|
| }
|
|
|
| // Generate the manifest file, add to the list of input files.
|
|
|