diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-13 18:42:29 -0400 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-13 18:42:29 -0400 |
commit | d6247edb2ab541540b4f0420fff5b8ae43a5f8c1 (patch) | |
tree | f40db4385fd7fc61cdf6c31fc63a5fc039f3ceed /pkg/api/api0/client.go | |
parent | dc0d9298fa09a45d53955d4171f1a62127523d2d (diff) | |
download | Atlas-d6247edb2ab541540b4f0420fff5b8ae43a5f8c1.tar.gz Atlas-d6247edb2ab541540b4f0420fff5b8ae43a5f8c1.zip |
pkg/api/api0: Implement version gate
Diffstat (limited to 'pkg/api/api0/client.go')
-rw-r--r-- | pkg/api/api0/client.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/api/api0/client.go b/pkg/api/api0/client.go index 3f10dcb..b805261 100644 --- a/pkg/api/api0/client.go +++ b/pkg/api/api0/client.go @@ -75,7 +75,13 @@ func (h *Handler) handleClientAuthWithSelf(w http.ResponseWriter, r *http.Reques return } - // TODO: version gate + if !h.checkLauncherVersion(r) { + respJSON(w, r, http.StatusBadRequest, map[string]any{ + "success": false, + "error": ErrorCode_UNSUPPORTED_VERSION, + }) + return + } uidQ := r.URL.Query().Get("id") if uidQ == "" { |