From 94c141d6a4ff045b327ffeb7c64bebc0fe931e3e Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Mon, 10 Oct 2022 12:30:07 +0200 Subject: [PATCH] caches: fix id sanitizer. --- rhodecode/lib/vcs/client_http.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rhodecode/lib/vcs/client_http.py b/rhodecode/lib/vcs/client_http.py index f3d9cbd4..5c7da2e3 100644 --- a/rhodecode/lib/vcs/client_http.py +++ b/rhodecode/lib/vcs/client_http.py @@ -185,9 +185,10 @@ class RemoteRepo(object): self.url = remote_maker.url self.stream_url = remote_maker.stream_url self._session = remote_maker._session_factory() + cache_repo_id = self._repo_id_sanitizer(repo_id) self._cache_region, self._cache_namespace = \ - remote_maker.init_cache_region(self._repo_id_sanitizer(cache_repo_id)) + remote_maker.init_cache_region(cache_repo_id) with_wire = with_wire or {} @@ -212,7 +213,7 @@ class RemoteRepo(object): self.cert_dir = get_cert_path(rhodecode.CONFIG.get('__file__')) def _repo_id_sanitizer(self, repo_id): - return repo_id.replace('/', '__') + return repo_id.replace('/', '__').replace('-', '_') def __getattr__(self, name):