Skip to content

Commit fb4f63f

Browse files
fix(api): reject double-slash prefix in secret file paths
1 parent ebb58af commit fb4f63f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 172
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f63ed183567d574cc063cf415990670e949f058ebc27c8f5b58a66c88a47f1b9.yml
3-
openapi_spec_hash: 7ef9fdbaf346bf292cd40344c35915e5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-95f4b5f46092288bbcb7239f4645a5c4a8bab207af478d684bda7b1824302249.yml
3+
openapi_spec_hash: 71d0bd114741dc44f319186f1bb29388
44
config_hash: ad1db65b32248aecda41b64586aac9ce

src/gitpod/resources/secrets.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ def create(
126126
secret
127127
128128
file_path: absolute path to the file where the secret is mounted value must be an absolute
129-
path (start with a /):
129+
path (e.g. /path/to/file):
130130
131131
```
132-
this.matches("^/(?:[^/]*/)*.*$")
132+
this.matches("^/[^/].*$")
133133
```
134134
135135
project_id: project_id is the ProjectID this Secret belongs to Deprecated: use scope instead
@@ -502,10 +502,10 @@ async def create(
502502
secret
503503
504504
file_path: absolute path to the file where the secret is mounted value must be an absolute
505-
path (start with a /):
505+
path (e.g. /path/to/file):
506506
507507
```
508-
this.matches("^/(?:[^/]*/)*.*$")
508+
this.matches("^/[^/].*$")
509509
```
510510
511511
project_id: project_id is the ProjectID this Secret belongs to Deprecated: use scope instead

src/gitpod/types/secret_create_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ class SecretCreateParams(TypedDict, total=False):
3333
file_path: Annotated[str, PropertyInfo(alias="filePath")]
3434
"""
3535
absolute path to the file where the secret is mounted value must be an absolute
36-
path (start with a /):
36+
path (e.g. /path/to/file):
3737
3838
```
39-
this.matches('^/(?:[^/]*/)*.*$')
39+
this.matches('^/[^/].*$')
4040
```
4141
"""
4242

0 commit comments

Comments
 (0)