From 4b3a13797ad0dca36b74327fa65195499168440d Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 10 Mar 2022 15:45:33 -0500 Subject: [PATCH 1/4] Windows Advanced Installer stuff for 1.8.6 --- ext/installfiles/windows/ZeroTier One.aip | 26 ++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/ext/installfiles/windows/ZeroTier One.aip b/ext/installfiles/windows/ZeroTier One.aip index 6275d88a..b644027a 100644 --- a/ext/installfiles/windows/ZeroTier One.aip +++ b/ext/installfiles/windows/ZeroTier One.aip @@ -1,5 +1,5 @@ - + @@ -27,10 +27,10 @@ - + - + @@ -66,7 +66,7 @@ - + @@ -440,9 +440,12 @@ + + + @@ -450,20 +453,33 @@ + + + + + + + + + + + + + @@ -520,7 +536,7 @@ - + From e2d4571adef803fef944f4a0a1ee860d7a8a0501 Mon Sep 17 00:00:00 2001 From: hcwhan Date: Mon, 14 Mar 2022 10:34:26 +0800 Subject: [PATCH 2/4] Dockerfile version bump to 1.8.6 --- ext/installfiles/linux/zerotier-containerized/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/installfiles/linux/zerotier-containerized/Dockerfile b/ext/installfiles/linux/zerotier-containerized/Dockerfile index b6d122a0..7758faf3 100644 --- a/ext/installfiles/linux/zerotier-containerized/Dockerfile +++ b/ext/installfiles/linux/zerotier-containerized/Dockerfile @@ -7,11 +7,11 @@ FROM debian:buster-slim as builder RUN apt-get update && apt-get install -y curl gnupg RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 0x1657198823e52a61 && \ echo "deb http://download.zerotier.com/debian/buster buster main" > /etc/apt/sources.list.d/zerotier.list -RUN apt-get update && apt-get install -y zerotier-one=1.8.4 +RUN apt-get update && apt-get install -y zerotier-one=1.8.6 COPY ext/installfiles/linux/zerotier-containerized/main.sh /var/lib/zerotier-one/main.sh FROM debian:buster-slim -LABEL version="1.8.4" +LABEL version="1.8.6" LABEL description="Containerized ZeroTier One for use on CoreOS or other Docker-only Linux hosts." # ZeroTier relies on UDP port 9993 From 73ec8cddd7aebd5567dd15fe64c8d4b0975abeb9 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Thu, 10 Mar 2022 12:59:26 -0800 Subject: [PATCH 3/4] Show sso errors on the last step of the oidc process --- service/OneService.cpp | 94 +++++++++++++++++++++++++----------------- zeroidc/src/lib.rs | 7 ++++ 2 files changed, 63 insertions(+), 38 deletions(-) diff --git a/service/OneService.cpp b/service/OneService.cpp index f8ecb682..246df744 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -147,8 +147,47 @@ size_t curlResponseWrite(void *ptr, size_t size, size_t nmemb, std::string *data } #endif + namespace ZeroTier { +const char *ssoResponseTemplate = "\ +\ +\ +\ +\ +





\ +
\ +
\ +
%s
\ +
\ +\ +"; + // Configured networks class NetworkState { @@ -1670,8 +1709,21 @@ public: } #if OIDC_SUPPORTED } else if (ps[0] == "sso") { + char resBuf[4096] = {0}; + const char *error = zeroidc::zeroidc_get_url_param_value("error", path.c_str()); + if (error != nullptr) { + const char *desc = zeroidc::zeroidc_get_url_param_value("error_description", path.c_str()); + scode = 500; + char errBuff[256] = {0}; + sprintf(errBuff, "ERROR %s: %s", error, desc); + sprintf(resBuf, ssoResponseTemplate, errBuff); + responseBody = std::string(resBuf); + responseContentType = "text/html"; + return scode; + } + // SSO redirect handling - const char* state = zeroidc::zeroidc_get_url_param_value("state", path.c_str()); + const char* state = zeroidc::zeroidc_get_url_param_value("state", path.c_str()); const char* nwid = zeroidc::zeroidc_network_id_from_state(state); const uint64_t id = Utils::hexStrToU64(nwid); @@ -1681,43 +1733,9 @@ public: const char* code = zeroidc::zeroidc_get_url_param_value("code", path.c_str()); ns.doTokenExchange(code); scode = 200; - responseBody = "\ -\ -\ -\ -\ -





\ -
\ -
\ -
Authentication Successful. You may now access the network.
\ -
\ -\ -"; + sprintf(resBuf, ssoResponseTemplate, "Authentication Successful. You may now access the network."); + responseBody = std::string(resBuf); + responseContentType = "text/html"; return scode; } else { diff --git a/zeroidc/src/lib.rs b/zeroidc/src/lib.rs index a5db2319..80c13bb7 100644 --- a/zeroidc/src/lib.rs +++ b/zeroidc/src/lib.rs @@ -325,6 +325,13 @@ impl ZeroIDC { println!("Central post failed: {}", r.status().to_string()); println!("hit url: {}", r.url().as_str()); println!("Status: {}", r.status()); + if let Ok(body) = r.bytes() { + if let Ok(body) = std::str::from_utf8(&body) { + println!("Body: {}", body); + } + + } + (*inner_local.lock().unwrap()).exp_time = 0; (*inner_local.lock().unwrap()).running = false; } From 28005344451368af644b164dab568ae2c0d72a02 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 21 Mar 2022 17:34:52 -0400 Subject: [PATCH 4/4] 1.8.7 --- RELEASE-NOTES.md | 6 ++++++ debian/changelog | 6 ++++++ ext/installfiles/mac/ZeroTier One.pkgproj | 2 +- version.h | 2 +- zerotier-one.spec | 5 ++++- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 4f810b5d..13756f4e 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,6 +1,12 @@ ZeroTier Release Notes ====== +# 2022-03-21 -- Version 1.8.7 + + * Fix for dependency installations in Windows MSI package + * Fix for privilege escalation in desktop UI when the user is not a current super-user + * Bug fix in local OIDC / SSO support + # 2022-03-04 -- Version 1.8.6 * Fixed an issue that could cause the UI to be non-responsive if not joined to any networks. diff --git a/debian/changelog b/debian/changelog index 512be844..3c265542 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +zerotier-one (1.8.7) unstable; urgency=medium + + * See RELEASE-NOTES.md for release notes. + + -- Adam Ierymenko Mon, 21 Mar 2022 01:00:00 -0700 + zerotier-one (1.8.6) unstable; urgency=medium * See RELEASE-NOTES.md for release notes. diff --git a/ext/installfiles/mac/ZeroTier One.pkgproj b/ext/installfiles/mac/ZeroTier One.pkgproj index 48af67b3..75bf70aa 100755 --- a/ext/installfiles/mac/ZeroTier One.pkgproj +++ b/ext/installfiles/mac/ZeroTier One.pkgproj @@ -701,7 +701,7 @@ USE_HFS+_COMPRESSION VERSION - 1.8.6 + 1.8.7 TYPE 0 diff --git a/version.h b/version.h index 9b311bb1..0f2a7e0a 100644 --- a/version.h +++ b/version.h @@ -27,7 +27,7 @@ /** * Revision */ -#define ZEROTIER_ONE_VERSION_REVISION 6 +#define ZEROTIER_ONE_VERSION_REVISION 7 /** * Build version diff --git a/zerotier-one.spec b/zerotier-one.spec index 483de24d..d84455c1 100644 --- a/zerotier-one.spec +++ b/zerotier-one.spec @@ -1,5 +1,5 @@ Name: zerotier-one -Version: 1.8.6 +Version: 1.8.7 Release: 1%{?dist} Summary: ZeroTier network virtualization service @@ -165,6 +165,9 @@ esac %endif %changelog +* Fri Mar 21 2022 Adam Ierymenko - 1.8.7 +- see https://github.com/zerotier/ZeroTierOne for release notes + * Fri Mar 07 2022 Adam Ierymenko - 1.8.6 - see https://github.com/zerotier/ZeroTierOne for release notes