From fd1c6b2e7dddf4e7f6dfcc59b8833ab57aa7a94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 18 Jul 2023 10:39:20 +0200 Subject: [PATCH 1/4] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20=20Upgrade=20PyYaml=20?= =?UTF-8?q?to=206.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This works around a bug when installing PyYaml >=5.4.1,<6.0.1 ever since Cython 3.0 has been released. PyYaml 6.0.1 pins Cython to a version less than 3.0 which resolves this issue (for now). See also yaml/pyyaml#724 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2b339221b..015458422 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,7 @@ core_deps = [ "pydantic>=1.10.7,<2", "pylru>=1.2.1,<2", "pyserial>=3.5,<4", - "PyYAML>=5.4.1,<6", # no changelog available for version 6, so we're not risking it + "PyYAML>=6.0.1,<7", # changelog at https://github.com/yaml/pyyaml/blob/master/CHANGES "requests>=2.28.2,<3", "sarge==0.1.7.post1", "semantic_version>=2.10.0,<3", From c4fab1b7e65b9b253b20b535be51842c61c45530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 15 May 2023 11:08:39 +0200 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20swu:=20fix=20httpheader=20ch?= =?UTF-8?q?eck=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was not storing its current value properly, thanks to an incomplete refactoring ages ago during which etag and lastmodified types were joined into httpheader. Closes #4806 --- src/octoprint/plugins/softwareupdate/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/plugins/softwareupdate/__init__.py b/src/octoprint/plugins/softwareupdate/__init__.py index 43886af01..d271c1041 100644 --- a/src/octoprint/plugins/softwareupdate/__init__.py +++ b/src/octoprint/plugins/softwareupdate/__init__.py @@ -61,7 +61,7 @@ class SoftwareUpdatePlugin( octoprint.plugin.EventHandlerPlugin, ): COMMIT_TRACKING_TYPES = ("github_commit", "bitbucket_commit") - CURRENT_TRACKING_TYPES = COMMIT_TRACKING_TYPES + ("etag", "lastmodified", "jsondata") + CURRENT_TRACKING_TYPES = COMMIT_TRACKING_TYPES + ("httpheader", "jsondata") RELEASE_TRACKING_TYPES = ("github_release",) OCTOPRINT_RESTART_TYPES = ("pip", "single_file_plugin") From cf86f08d04f4f2db1a47290137d9742c6a2c671b Mon Sep 17 00:00:00 2001 From: Christopher Perrin Date: Wed, 29 Mar 2023 13:32:15 +0200 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=A5=85=20Workaround=20for=20faulty=20?= =?UTF-8?q?argon2=20hashes=20on=20aarch64=20(#4780)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensure we can successfully verify an argon2 hash before using it. Closes #4779 --- AUTHORS.md | 1 + src/octoprint/access/users.py | 2 +- tests/access/users/test_usermanager.py | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 1eff52cdc..6a4e0241f 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -176,6 +176,7 @@ date of first contribution): * [Moiz Rasheed](https://github.com/msrasheed) * [Scott Martin](https://github.com/smartin015) * [Shyam Sunder](https://github.com/sgsunder) + * [Christopher Perrin](https://github.com/cperrin88) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/src/octoprint/access/users.py b/src/octoprint/access/users.py index 25facd782..20285bdd6 100644 --- a/src/octoprint/access/users.py +++ b/src/octoprint/access/users.py @@ -27,7 +27,7 @@ try: # test if we can actually hash and verify, if not we won't use this backend hash = argon2.hash("test") - argon2.verify("test", hash) + assert argon2.verify("test", hash) password_hashers.append(argon2) except Exception: diff --git a/tests/access/users/test_usermanager.py b/tests/access/users/test_usermanager.py index b566492dc..29a6312ba 100644 --- a/tests/access/users/test_usermanager.py +++ b/tests/access/users/test_usermanager.py @@ -21,3 +21,17 @@ class UserManagerTest(unittest.TestCase): # should not throw an exception octoprint.access.users.UserManager.create_password_hash(password) + + def test_createPasswordHash_is_valid(self): + password = "test1234" + password_hash = octoprint.access.users.UserManager.create_password_hash(password) + user = octoprint.access.users.User( + "username", + password_hash, + True, + permissions=[], + apikey="apikey", + settings={"key": "value"}, + ) + + self.assertTrue(user.check_password(password)) From f027aaa7300f70b046525a49245b33c43dd198c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 18 Jul 2023 11:52:11 +0200 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=94=96=20Preparing=20release=20of=201?= =?UTF-8?q?.9.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SUPPORTERS.md | 2 +- src/octoprint/plugins/errortracking/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SUPPORTERS.md b/SUPPORTERS.md index bafb60aaa..6820f28cd 100644 --- a/SUPPORTERS.md +++ b/SUPPORTERS.md @@ -66,4 +66,4 @@ thanks to everyone who contributed! * Steve Thompson * Ulrich Kempken -and 1979 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [GitHub Sponsors](https://github.com/users/foosel/sponsorship)! +and 1970 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [GitHub Sponsors](https://github.com/users/foosel/sponsorship)! diff --git a/src/octoprint/plugins/errortracking/__init__.py b/src/octoprint/plugins/errortracking/__init__.py index e7b405b5f..a6225ceac 100644 --- a/src/octoprint/plugins/errortracking/__init__.py +++ b/src/octoprint/plugins/errortracking/__init__.py @@ -18,10 +18,10 @@ from octoprint.util.version import ( ) SENTRY_URL_SERVER = ( - "https://2887d6b262504b589a67632ab6ff6953@o118517.ingest.sentry.io/1373987" + "https://ba4e3d61c37a4d219e1cd81bdc1417a7@o118517.ingest.sentry.io/1373987" ) SENTRY_URL_COREUI = ( - "https://b6be6ca750ff4f8aabb07119fc6a7f31@o118517.ingest.sentry.io/1374096" + "https://2382252761de4d318e5f83be0816efaa@o118517.ingest.sentry.io/1374096" ) SETTINGS_DEFAULTS = {