Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit289fa25

Browse files
fix: ensure path elements are escaped
Ensure the path elements that are passed to the server are escaped.For example a "/" will be changed to "%2F"Closes:#2116
1 parentca3b438 commit289fa25

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎gitlab/base.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,12 @@ def _compute_path(self, path: Optional[str] = None) -> Optional[str]:
380380
ifself._parentisNoneornotself._from_parent_attrs:
381381
returnpath
382382

383-
data= {
384-
self_attr:getattr(self._parent,parent_attr,None)
385-
forself_attr,parent_attrinself._from_parent_attrs.items()
386-
}
383+
data:Dict[str,Optional[gitlab.utils.EncodedId]]= {}
384+
forself_attr,parent_attrinself._from_parent_attrs.items():
385+
ifnothasattr(self._parent,parent_attr):
386+
data[self_attr]=None
387+
continue
388+
data[self_attr]=gitlab.utils.EncodedId(getattr(self._parent,parent_attr))
387389
self._parent_attrs=data
388390
returnpath.format(**data)
389391

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp