diff --git a/lib/kmxgit/git_manager.ex b/lib/kmxgit/git_manager.ex
index 6d1f4d6..fbeeb6b 100644
--- a/lib/kmxgit/git_manager.ex
+++ b/lib/kmxgit/git_manager.ex
@@ -3,6 +3,7 @@ defmodule Kmxgit.GitManager do
@git_root "priv/git"
def git_dir(repo) do
+ if String.match?(repo, ~r/(^|\/)\.\.($|\/)/), do: raise "invalid git dir"
"#{@git_root}/#{repo}.git"
end