ruby-jss 4.2.1 → 4.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +29 -0
- data/lib/jamf/api/classic/api_objects/policy.rb +2 -2
- data/lib/jamf/api/classic/api_objects/scopable.rb +2 -1
- data/lib/jamf/api/classic/base_classes/extension_attribute.rb +2 -2
- data/lib/jamf/api/jamf_pro/api_objects/j_package.rb +12 -10
- data/lib/jamf/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e7ad859997c4a7a6a5193c1361d9c6857f1f686228fa21c8a9f0b1ff0415a68
|
4
|
+
data.tar.gz: bfa9c1e6b81536615408ac424f8b130db94a83f3631da8b3367a5695f6efcb17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 847adedb756ad11d89c77d8cf5bf537d36db0f8223d00bc9c83e9cabb5cd06552cd5b33b032adc84ef6c85c44e96b5d0228a53308d01d06abc5172df3781e8fa
|
7
|
+
data.tar.gz: a4f4139af258cdccd444bbe1e534442284af3e2c2915f027874248917268786ddc2fda978c4fbd927f2f5e8b2673e2ff1bb52a2e788d98c461fca435d1c39b29
|
data/CHANGES.md
CHANGED
@@ -14,6 +14,35 @@ __Please update all installations of ruby-jss to at least v1.6.0.__
|
|
14
14
|
|
15
15
|
Many many thanks to actae0n of Blacksun Hackers Club for reporting this issue and providing examples of how it could be exploited.
|
16
16
|
|
17
|
+
--------
|
18
|
+
## \[4.2.3] 2025-09-23
|
19
|
+
|
20
|
+
### Fixed
|
21
|
+
- Fixed bug were `#save` was not returning the object's Jamf ID when updating scopable objects.
|
22
|
+
- Fixed bug where `Jamf::Policy#retry_event=` raisse error when no retry_attempts are defined.
|
23
|
+
|
24
|
+
--------
|
25
|
+
## \[4.2.2] 2025-09-06
|
26
|
+
|
27
|
+
### Fixed
|
28
|
+
- Class `Jamf::JPackage` no longer raises `Errno::EINVAL Invalid argument @ io_fread` when generating manifest checksums for very large package files.
|
29
|
+
|
30
|
+
|
31
|
+
### Deprecated
|
32
|
+
|
33
|
+
- Class `Jamf::DBConnection`. Access to the MySQL backend database for on-prem Jamf Pro installations will be removed in a future release, probably some time in mid-late 2026. If you use this class, please update your code to make and use such connections independently of ruby-jss. This removal also includes the 'default' instance stored in `Jamf::DB_CNX` and `Jamf.db`.
|
34
|
+
|
35
|
+
The following methods will also be removed, as they require that class for direct database access.
|
36
|
+
- `Jamf::ComputerExtensionAttribute#history`
|
37
|
+
- `Jamf::MobileDeviceExtensionAttribute#history`
|
38
|
+
- `Jamf::Icon.all`
|
39
|
+
- `Jamf::SelfServable#validate_icon`
|
40
|
+
- `Jamf::APIObject#add_object_history_entry`
|
41
|
+
|
42
|
+
Note that some objects in the Jamf Pro API have access to their object_history. As classes are migrated (see release notes for 4.2.0 below) that access will be included when available.
|
43
|
+
|
44
|
+
|
45
|
+
|
17
46
|
--------
|
18
47
|
## \[4.2.1] 2025-08-11
|
19
48
|
|
@@ -928,7 +928,7 @@ module Jamf
|
|
928
928
|
|
929
929
|
# if the event is not 'none' and attempts is <= 0,
|
930
930
|
# set events to 1, or the API won't accept it
|
931
|
-
@retry_attempts = 1 if !(evt == RETRY_EVENTS[:none]) && !@retry_attempts.positive?
|
931
|
+
@retry_attempts = 1 if !(evt == RETRY_EVENTS[:none]) && !@retry_attempts.to_i.positive?
|
932
932
|
|
933
933
|
@retry_event = evt
|
934
934
|
@need_to_update = true
|
@@ -1907,7 +1907,7 @@ module Jamf
|
|
1907
1907
|
output = Jamf::Client.run_jamf('policy', "-id #{id}", show_output)
|
1908
1908
|
return nil if output.include? 'No policies were found for the ID'
|
1909
1909
|
|
1910
|
-
$CHILD_STATUS.exitstatus.zero?
|
1910
|
+
$CHILD_STATUS.exitstatus.zero? || false
|
1911
1911
|
end
|
1912
1912
|
alias execute run
|
1913
1913
|
|
@@ -109,8 +109,9 @@ module Jamf
|
|
109
109
|
# when we couldn't verify all ldap users/groups due to lack of ldap connections
|
110
110
|
#
|
111
111
|
def update
|
112
|
-
super
|
112
|
+
resp = super
|
113
113
|
@scope.should_update = false
|
114
|
+
resp
|
114
115
|
rescue Jamf::ConflictError => e
|
115
116
|
raise Jamf::InvalidDataError, 'Potentially non-existant LDAP user or group in new scope values.' if scope.unable_to_verify_ldap_entries == true
|
116
117
|
|
@@ -84,7 +84,7 @@ module Jamf
|
|
84
84
|
INPUT_TYPE_FIELD = 'Text Field'.freeze
|
85
85
|
INPUT_TYPE_POPUP = 'Pop-up Menu'.freeze
|
86
86
|
INPUT_TYPE_SCRIPT = 'script'.freeze
|
87
|
-
INPUT_TYPE_LDAP = '
|
87
|
+
INPUT_TYPE_LDAP = 'Directory Service Attribute Mapping'.freeze
|
88
88
|
|
89
89
|
INPUT_TYPES = [
|
90
90
|
INPUT_TYPE_FIELD,
|
@@ -138,7 +138,7 @@ module Jamf
|
|
138
138
|
# @return [Array<String>] the choices available in the UI when the @input_type is "Pop-up Menu"
|
139
139
|
attr_reader :popup_choices
|
140
140
|
|
141
|
-
# @return [String] the
|
141
|
+
# @return [String] the Directory Service attribute for the User's ldap entry that maps to this EA, when input type is INPUT_TYPE_LDAP
|
142
142
|
attr_reader :attribute_mapping
|
143
143
|
|
144
144
|
# @return [String] In which part of the web UI does the data appear?
|
@@ -661,7 +661,15 @@ module Jamf
|
|
661
661
|
# @return [void]
|
662
662
|
##############################
|
663
663
|
def calculate_manifest_checksums(file, new_manifest, chunk_size: nil)
|
664
|
+
# we need the whole file checksum even if chunking, so
|
665
|
+
# get that first
|
666
|
+
# The Digest::SHA256.file method will read even huge files successfully
|
667
|
+
# without loading the whole file into memory, as would File.read.
|
668
|
+
#
|
669
|
+
whole_file_checksum = Digest::SHA256.file(file).hexdigest
|
670
|
+
|
664
671
|
# are we chunking the download?
|
672
|
+
# we need checksums for each chunk, and the size of each chunk
|
665
673
|
if chunk_size.is_a? Integer
|
666
674
|
new_manifest[:items][0][:assets][0]['sha256-size'] = chunk_size
|
667
675
|
file.open do |f|
|
@@ -670,23 +678,17 @@ module Jamf
|
|
670
678
|
end
|
671
679
|
end
|
672
680
|
|
673
|
-
# not chunking, use the file filesize
|
681
|
+
# not chunking, use the file filesize and whole-file checksum
|
674
682
|
else
|
675
683
|
new_manifest[:items][0][:assets][0]['sha256-size'] = file.size
|
676
|
-
new_manifest[:items][0][:assets][0]['sha256s'] = [
|
684
|
+
new_manifest[:items][0][:assets][0]['sha256s'] = [whole_file_checksum]
|
677
685
|
end
|
678
686
|
|
679
687
|
# Store the whole-file checksum in
|
680
|
-
# manifest[:items][0][:metadata]['sha256-whole']
|
681
|
-
# manifest[:items][0][:assets][0]['sha256s'][0], if available, or generate it if needed
|
688
|
+
# manifest[:items][0][:metadata]['sha256-whole'], a non-standard key used by ruby-jss.
|
682
689
|
# It is used by the deploy_via_mdm method.
|
683
690
|
# This value is required for MDM deployments, even if the file is chunked in the manifest.
|
684
|
-
new_manifest[:items][0][:metadata]['sha256-whole'] =
|
685
|
-
if new_manifest[:items][0][:assets][0]['sha256s'].size == 1
|
686
|
-
new_manifest[:items][0][:assets][0]['sha256s'][0]
|
687
|
-
else
|
688
|
-
Digest::SHA256.hexdigest(file.read)
|
689
|
-
end
|
691
|
+
new_manifest[:items][0][:metadata]['sha256-whole'] = whole_file_checksum
|
690
692
|
end
|
691
693
|
private :calculate_manifest_checksums
|
692
694
|
|
data/lib/jamf/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-jss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Lasell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-09-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: CFPropertyList
|
@@ -502,7 +502,7 @@ files:
|
|
502
502
|
- test/tests/policy.rb
|
503
503
|
homepage: http://pixaranimationstudios.github.io/ruby-jss/
|
504
504
|
licenses:
|
505
|
-
-
|
505
|
+
- LicenseRef-LICENSE.txt
|
506
506
|
metadata:
|
507
507
|
source_code_uri: https://github.com/PixarAnimationStudios/ruby-jss
|
508
508
|
changelog_uri: https://github.com/PixarAnimationStudios/ruby-jss/blob/master/CHANGES.md
|