Skip to content

Commit 5d88f68

Browse files
author
Gauvain Pocentek
committed
Sanitize the id used to construct URLs
Closes #28
1 parent acc1511 commit 5d88f68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gitlab/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,9 @@ def get(self, obj_class, id=None, **kwargs):
381381
raise GitlabGetError('Missing attribute(s): %s' %
382382
", ".join(missing))
383383

384-
url = self._construct_url(id_=id, obj=obj_class, parameters=kwargs)
384+
sanitized_id = _sanitize(id)
385+
url = self._construct_url(id_=sanitized_id, obj=obj_class,
386+
parameters=kwargs)
385387
headers = self._create_headers()
386388

387389
# Remove attributes that are used in url so that there is only

0 commit comments

Comments
 (0)