diff options
-rw-r--r-- | handle_repo_commit.go | 1 | ||||
-rw-r--r-- | handle_repo_index.go | 1 | ||||
-rw-r--r-- | handle_repo_log.go | 3 | ||||
-rw-r--r-- | handle_repo_raw.go | 1 | ||||
-rw-r--r-- | handle_repo_tree.go | 1 |
5 files changed, 1 insertions, 6 deletions
diff --git a/handle_repo_commit.go b/handle_repo_commit.go index 22d58ec..4bec9dd 100644 --- a/handle_repo_commit.go +++ b/handle_repo_commit.go @@ -16,7 +16,6 @@ type usable_file_patch struct { func handle_repo_commit(w http.ResponseWriter, r *http.Request) { data := make(map[string]any) - // TODO: Sanitize path values group_name, repo_name, commit_id_specified_string := r.PathValue("group_name"), r.PathValue("repo_name"), r.PathValue("commit_id") data["group_name"], data["repo_name"] = group_name, repo_name repo, err := open_git_repo(group_name, repo_name) diff --git a/handle_repo_index.go b/handle_repo_index.go index a5a6dc5..da19332 100644 --- a/handle_repo_index.go +++ b/handle_repo_index.go @@ -6,7 +6,6 @@ import ( func handle_repo_index(w http.ResponseWriter, r *http.Request) { data := make(map[string]any) - // TODO: Sanitize path values group_name, repo_name := r.PathValue("group_name"), r.PathValue("repo_name") data["group_name"], data["repo_name"] = group_name, repo_name repo, err := open_git_repo(group_name, repo_name) diff --git a/handle_repo_log.go b/handle_repo_log.go index 6a2d8bb..62e0e4f 100644 --- a/handle_repo_log.go +++ b/handle_repo_log.go @@ -6,10 +6,9 @@ import ( "github.com/go-git/go-git/v5/plumbing" ) -// TODO: I probably shouldn't include *all* commitsh here... +// TODO: I probably shouldn't include *all* commits here... func handle_repo_log(w http.ResponseWriter, r *http.Request) { data := make(map[string]any) - // TODO: Sanitize path values group_name, repo_name, ref_name := r.PathValue("group_name"), r.PathValue("repo_name"), r.PathValue("ref") data["group_name"], data["repo_name"], data["ref"] = group_name, repo_name, ref_name repo, err := open_git_repo(group_name, repo_name) diff --git a/handle_repo_raw.go b/handle_repo_raw.go index d3ffe3e..7ed3842 100644 --- a/handle_repo_raw.go +++ b/handle_repo_raw.go @@ -11,7 +11,6 @@ import ( func handle_repo_raw(w http.ResponseWriter, r *http.Request) { data := make(map[string]any) - // TODO: Sanitize path values raw_path_spec := r.PathValue("rest") group_name, repo_name, path_spec := r.PathValue("group_name"), r.PathValue("repo_name"), strings.TrimSuffix(raw_path_spec, "/") diff --git a/handle_repo_tree.go b/handle_repo_tree.go index 824f5df..1d18598 100644 --- a/handle_repo_tree.go +++ b/handle_repo_tree.go @@ -16,7 +16,6 @@ import ( func handle_repo_tree(w http.ResponseWriter, r *http.Request) { data := make(map[string]any) - // TODO: Sanitize path values raw_path_spec := r.PathValue("rest") group_name, repo_name, path_spec := r.PathValue("group_name"), r.PathValue("repo_name"), strings.TrimSuffix(raw_path_spec, "/") ref_type, ref_name, err := get_param_ref_and_type(r) |