Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-shell
Commits
d8565cff
Commit
d8565cff
authored
Nov 13, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Escape repository path
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
a0104118
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
lib/gitlab_shell.rb
lib/gitlab_shell.rb
+9
-1
No files found.
lib/gitlab_shell.rb
View file @
d8565cff
...
...
@@ -43,7 +43,7 @@ class GitlabShell
def
parse_cmd
args
=
Shellwords
.
shellwords
(
@origin_cmd
)
@git_cmd
=
args
[
0
]
@repo_name
=
args
[
1
]
@repo_name
=
escape_path
(
args
[
1
])
end
def
git_cmds
...
...
@@ -86,4 +86,12 @@ class GitlabShell
def
log_username
@config
.
audit_usernames
?
username
:
"user with key
#{
@key_id
}
"
end
def
escape_path
(
path
)
if
File
.
absolute_path
(
path
,
repos_path
)
==
File
.
join
(
repos_path
,
path
)
path
else
raise
"Wrong repository path"
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment